diff --git a/src/lib.rs b/src/lib.rs index b4f87e1..d5256cc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,10 +79,11 @@ mod tests { for _ in 0..4096 { rng.fill_bytes(&mut privkey); let zengo_keypair = KeyPair::create_from_private_key(privkey); - let dalek_secret = ed25519_dalek::SecretKey::try_from(privkey) + let dalek_secret: [u8; 32] = ed25519_dalek::SecretKey::try_into(privkey) .expect("Can only fail if bytes.len()<32"); - let dalek_pub = ed25519_dalek::VerifyingKey::from_bytes(&privkey).unwrap(); - assert_eq!(zengo_keypair.pubkey(), dalek_pub.to_bytes()); + let dalek_pub = ed25519_dalek::SigningKey::from_bytes(&dalek_secret); + + assert_eq!(zengo_keypair.pubkey(), dalek_pub.verifying_key().to_bytes()); } }