mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 09:31:02 +00:00
Encryption support for the statement store (#14440)
* Added ECIES encryption * tweaks * fmt * Make clippy happy * Use local keystore * qed
This commit is contained in:
@@ -505,12 +505,8 @@ impl TraitPair for Pair {
|
||||
}
|
||||
|
||||
fn verify<M: AsRef<[u8]>>(sig: &Self::Signature, message: M, pubkey: &Self::Public) -> bool {
|
||||
let Ok(signature) = schnorrkel::Signature::from_bytes(sig.as_ref()) else {
|
||||
return false
|
||||
};
|
||||
let Ok(public) = PublicKey::from_bytes(pubkey.as_ref()) else {
|
||||
return false
|
||||
};
|
||||
let Ok(signature) = schnorrkel::Signature::from_bytes(sig.as_ref()) else { return false };
|
||||
let Ok(public) = PublicKey::from_bytes(pubkey.as_ref()) else { return false };
|
||||
public.verify_simple(SIGNING_CTX, message.as_ref(), &signature).is_ok()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user