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 key or keypair from a JWK

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

Accessor for the key algorithm

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

Unwrap a key using this key

Trait Implementations

Formats the value using the given formatter. Read more

Perform a key exchange, writing the result to the provided buffer.

Perform a key exchange and return a new allocated buffer.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.