Type Definition askar_crypto::alg::AnyKey [−][src]
pub type AnyKey = KeyT<dyn AnyKeyAlg + Send + Sync>;
Expand description
The type-erased representation for a concrete key instance
Trait Implementations
Encrypt a secret value in place, appending the verification tag and returning the length of the ciphertext Read more
Decrypt an encrypted (verification tag appended) value in place
Get the nonce and tag length for encryption
Get the ciphertext padding required
fn write_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>,
out: &mut dyn WriteBuffer
) -> Result<(), Error>
fn write_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>,
out: &mut dyn WriteBuffer
) -> Result<(), Error>
Create a signature of the requested type and write it to the provided buffer. Read more
fn create_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>
) -> Result<SecretBytes, Error>
fn create_signature(
&self,
message: &[u8],
sig_type: Option<SignatureType>
) -> Result<SecretBytes, Error>
alloc only.Create a signature of the requested type and return an allocated buffer. Read more
Write the JWK representation to an encoder
alloc only.Create the JWK thumbprint of the key
alloc only.Create a JWK of the public key
alloc only.Create a JWK of the secret key
Get the length of a public key
Write the key public bytes to a buffer.
alloc only.Write the key public bytes to a new allocated buffer.
Get the length of a secret key
Write the key secret bytes to a buffer.
alloc only.Write the key secret bytes to a new allocated buffer.