Merge pull request #316 from sanket1729/err_fix

Change error enum for KeyPair::from_seckey_slice
This commit is contained in:
Elichai Turkel 2021-06-28 11:43:25 +03:00 committed by GitHub
commit 6ac9f4d453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ impl KeyPair {
data: &[u8], data: &[u8],
) -> Result<KeyPair, Error> { ) -> Result<KeyPair, Error> {
if data.is_empty() || data.len() != constants::SECRET_KEY_SIZE { if data.is_empty() || data.len() != constants::SECRET_KEY_SIZE {
return Err(InvalidPublicKey); return Err(InvalidSecretKey);
} }
unsafe { unsafe {