File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ mod vectors {
7575
7676 // The signatures in the test vectors also include the message
7777 // at the end, but we just want R and S.
78- let sig1: Signature = Signature :: from_bytes ( & sig_bytes[ ..64 ] ) . unwrap ( ) ;
78+ let sig1: Signature = Signature :: try_from ( & sig_bytes[ ..64 ] ) . unwrap ( ) ;
7979 let sig2: Signature = keypair. sign ( & msg_bytes) ;
8080
8181 assert ! ( sig1 == sig2, "Signature bytes not equal on line {}" , lineno) ;
@@ -102,7 +102,7 @@ mod vectors {
102102 PublicKey :: from_bytes ( & pub_bytes[ ..PUBLIC_KEY_LENGTH ] ) . unwrap ( ) ;
103103 let keypair: Keypair = Keypair :: from ( secret) ;
104104 assert_eq ! ( expected_public, keypair. public_key( ) ) ;
105- let sig1: Signature = Signature :: from_bytes ( & sig_bytes[ ..] ) . unwrap ( ) ;
105+ let sig1: Signature = Signature :: try_from ( & sig_bytes[ ..] ) . unwrap ( ) ;
106106
107107 let mut prehash_for_signing: Sha512 = Sha512 :: default ( ) ;
108108 let mut prehash_for_verifying: Sha512 = Sha512 :: default ( ) ;
You can’t perform that action at this time.
0 commit comments