Trait elrond_wasm::api::CryptoApi [−][src]
pub trait CryptoApi { fn sha256(&self, data: &[u8]) -> H256; fn keccak256(&self, data: &[u8]) -> H256; fn verify_bls(&self, key: &[u8], message: &[u8], signature: &[u8]) -> bool; fn verify_ed25519(
&self,
key: &[u8],
message: &[u8],
signature: &[u8]
) -> bool; fn verify_secp256k1(
&self,
key: &[u8],
message: &[u8],
signature: &[u8]
) -> bool; }
Required methods
fn sha256(&self, data: &[u8]) -> H256
[src]
fn keccak256(&self, data: &[u8]) -> H256
[src]
fn verify_bls(&self, key: &[u8], message: &[u8], signature: &[u8]) -> bool
[src]
fn verify_ed25519(&self, key: &[u8], message: &[u8], signature: &[u8]) -> bool
[src]
fn verify_secp256k1(&self, key: &[u8], message: &[u8], signature: &[u8]) -> bool
[src]
Expand description
Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes.