Skip to content

Commit

Permalink
Fixups for upstream ed25519 crate changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Dec 7, 2022
1 parent 94302ba commit 652c273
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mod vectors {

// The signatures in the test vectors also include the message
// at the end, but we just want R and S.
let sig1: Signature = Signature::from_bytes(&sig_bytes[..64]).unwrap();
let sig1: Signature = Signature::try_from(&sig_bytes[..64]).unwrap();
let sig2: Signature = keypair.sign(&msg_bytes);

assert!(sig1 == sig2, "Signature bytes not equal on line {}", lineno);
Expand All @@ -102,7 +102,7 @@ mod vectors {
PublicKey::from_bytes(&pub_bytes[..PUBLIC_KEY_LENGTH]).unwrap();
let keypair: Keypair = Keypair::from(secret);
assert_eq!(expected_public, keypair.public_key());
let sig1: Signature = Signature::from_bytes(&sig_bytes[..]).unwrap();
let sig1: Signature = Signature::try_from(&sig_bytes[..]).unwrap();

let mut prehash_for_signing: Sha512 = Sha512::default();
let mut prehash_for_verifying: Sha512 = Sha512::default();
Expand Down

0 comments on commit 652c273

Please sign in to comment.