mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-07 15:53:14 +00:00
add test_new_os_random
This commit is contained in:
parent
2cf1817ca1
commit
72063ae8ed
@ -77,9 +77,24 @@ impl AddressKeyHolder {
|
||||
mod tests {
|
||||
use constants_types::{NULLIFIER_SECRET_CONST, VIEVING_SECRET_CONST};
|
||||
use elliptic_curve::group::GroupEncoding;
|
||||
use aes_gcm::{Aes256Gcm, aead::{Aead, KeyInit, OsRng}};
|
||||
use k256::{AffinePoint, ProjectivePoint, Scalar};
|
||||
use constants_types::{CipherText, Nonce};
|
||||
use elliptic_curve::group::prime::PrimeCurveAffine;
|
||||
use elliptic_curve::ff::Field;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_new_os_random() {
|
||||
// Ensure that a new AddressKeyHolder instance can be created without errors.
|
||||
let address_key_holder = AddressKeyHolder::new_os_random();
|
||||
|
||||
// Check that key holder fields are initialized with expected types
|
||||
assert!(!Into::<bool>::into(address_key_holder.nullifer_public_key.is_identity()));
|
||||
assert!(!Into::<bool>::into(address_key_holder.viewing_public_key.is_identity()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn key_generation_test() {
|
||||
let seed_holder = SeedHolder::new_os_random();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user