pub trait CryptoApiImpl: ManagedTypeApiImpl {
// Required methods
fn sha256_managed(
&self,
dest: Self::ManagedBufferHandle,
data_handle: Self::ManagedBufferHandle,
);
fn keccak256_managed(
&self,
dest: Self::ManagedBufferHandle,
data_handle: Self::ManagedBufferHandle,
);
fn ripemd160_managed(
&self,
dest: Self::ManagedBufferHandle,
data_handle: Self::ManagedBufferHandle,
);
fn verify_bls_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
);
fn verify_ed25519_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
);
fn verify_secp256k1_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
) -> bool;
fn verify_custom_secp256k1_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
hash_type: MessageHashType,
) -> bool;
fn encode_secp256k1_der_signature_managed(
&self,
r: Self::ManagedBufferHandle,
s: Self::ManagedBufferHandle,
dest: Self::ManagedBufferHandle,
);
fn verify_secp256r1_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
);
fn verify_bls_signature_share_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
);
fn verify_bls_aggregated_signature_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
);
}
Required Methods§
fn sha256_managed( &self, dest: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle, )
fn keccak256_managed( &self, dest: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle, )
fn ripemd160_managed( &self, dest: Self::ManagedBufferHandle, data_handle: Self::ManagedBufferHandle, )
fn verify_bls_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, )
fn verify_ed25519_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, )
Sourcefn verify_secp256k1_managed(
&self,
key: Self::ManagedBufferHandle,
message: Self::ManagedBufferHandle,
signature: Self::ManagedBufferHandle,
) -> bool
fn verify_secp256k1_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, ) -> bool
Note: the signature is minimum 2 bytes in length, the second byte encodes the length of the remaining signature bytes.
fn verify_custom_secp256k1_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, hash_type: MessageHashType, ) -> bool
fn encode_secp256k1_der_signature_managed( &self, r: Self::ManagedBufferHandle, s: Self::ManagedBufferHandle, dest: Self::ManagedBufferHandle, )
fn verify_secp256r1_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, )
fn verify_bls_aggregated_signature_managed( &self, key: Self::ManagedBufferHandle, message: Self::ManagedBufferHandle, signature: Self::ManagedBufferHandle, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.