Struct aries_askar::kms::LocalKey
source ·
[−]pub struct LocalKey { /* fields omitted */ }
Expand description
A stored key entry
Implementations
Create a new random key or keypair
Create a new deterministic key or keypair
Import a key or keypair from a JWK in binary format
Import a public key from its compact representation
Export the raw bytes of the public key
Import a symmetric key or public-private keypair from its compact representation
Export the raw bytes of the private key
Derive a new key from a Diffie-Hellman exchange between this keypair and a public key
Get the public JWK representation for this key or keypair
Get the JWK representation for this private key or keypair
Get the JWK thumbprint for this key or keypair
Get the set of indexed JWK thumbprints for this key or keypair
Map this key or keypair to its equivalent for another key algorithm
Fetch the AEAD parameter lengths
Calculate the padding required for a message
Create a new random nonce for AEAD message encryption
Perform AEAD message encryption with this encryption key
Perform AEAD message decryption with this encryption key
Sign a message with this private signing key
Verify a message signature with this private signing key or public verification key
Wrap another key using this key
Trait Implementations
fn write_key_exchange(
&self,
other: &LocalKey,
out: &mut dyn WriteBuffer
) -> Result<(), CryptoError>
fn write_key_exchange(
&self,
other: &LocalKey,
out: &mut dyn WriteBuffer
) -> Result<(), CryptoError>
Perform a key exchange, writing the result to the provided buffer.
Perform a key exchange and return a new allocated buffer.