Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Try not using from_ed25519_bytes to get secret key
Browse files Browse the repository at this point in the history
  • Loading branch information
ameba23 committed Oct 20, 2023
1 parent 1b7e87f commit 999a71b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn encrypt_and_sign(sk: Vec<u8>, msg: Vec<u8>, pk: Vec<u8>) -> Result<String
}

let sec_key =
SecretKey::from_ed25519_bytes(sk.as_slice()).map_err(|err| Error::new(&err.to_string()))?;
SecretKey::from_bytes(sk.as_slice()).map_err(|err| Error::new(&err.to_string()))?;
let pair = sr25519::Pair::from(sec_key);
let signed_message =
SignedMessage::new(&pair, &_msg, &_pk).map_err(|err| Error::new(&err.to_string()))?;
Expand Down

0 comments on commit 999a71b

Please sign in to comment.