File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -858,8 +858,8 @@ impl Keypair {
858
858
///
859
859
/// # Errors
860
860
///
861
- /// [`Error::InvalidSecretKey`] if the provided data has an incorrect length, exceeds Secp256k1
862
- /// field `p` value or the corresponding public key is not even .
861
+ /// [`Error::InvalidSecretKey`] if the slice is not exactly 32 bytes long,
862
+ /// or if the encoded number exceeds the Secp256k1 field `p` value .
863
863
#[ inline]
864
864
pub fn from_seckey_slice < C : Signing > (
865
865
secp : & Secp256k1 < C > ,
@@ -883,7 +883,8 @@ impl Keypair {
883
883
///
884
884
/// # Errors
885
885
///
886
- /// [`Error::InvalidSecretKey`] if corresponding public key for the provided secret key is not even.
886
+ /// [`Error::InvalidSecretKey`] if the string does not consist of exactly 64 hex characters,
887
+ /// or if the encoded number exceeds the Secp256k1 field `p` value.
887
888
#[ inline]
888
889
pub fn from_seckey_str < C : Signing > ( secp : & Secp256k1 < C > , s : & str ) -> Result < Keypair , Error > {
889
890
let mut res = [ 0u8 ; constants:: SECRET_KEY_SIZE ] ;
@@ -898,7 +899,8 @@ impl Keypair {
898
899
///
899
900
/// # Errors
900
901
///
901
- /// [`Error::InvalidSecretKey`] if corresponding public key for the provided secret key is not even.
902
+ /// [`Error::InvalidSecretKey`] if the string does not consist of exactly 64 hex characters,
903
+ /// or if the encoded number exceeds the Secp256k1 field `p` value.
902
904
#[ inline]
903
905
#[ cfg( feature = "global-context" ) ]
904
906
pub fn from_seckey_str_global ( s : & str ) -> Result < Keypair , Error > {
You can’t perform that action at this time.
0 commit comments