pub struct Handle { /* private fields */ }
Expand description

Handle provides access to a Keyset protobuf, to limit the exposure of actual protocol buffers that hold sensitive key material.

Implementations

Create a keyset handle that contains a single fresh key generated according to the given KeyTemplate.

Create a new instance of Handle using the given Keyset which does not contain any secret key material.

Attempt to create a Handle from an encrypted keyset obtained via a Reader.

Attempt to create a Handle from an encrypted keyset obtained via a Reader using the provided associated data.

Attempt to create a Handle from a keyset obtained via a Reader.

Return a Handle of the public keys if the managed keyset contains private keys.

Encrypts and writes the enclosed Keyset.

Encrypts and writes the enclosed Keyset using the provided associated data.

Export the keyset in h to the given Writer returning an error if the keyset contains secret key material.

Create a set of primitives corresponding to the keys with status=ENABLED in the keyset of the given keyset Handle, assuming all the corresponding key managers are present (keys with status!=ENABLED are skipped).

The returned set is usually later “wrapped” into a class that implements the corresponding Primitive interface.

Create a set of primitives corresponding to the keys with status=ENABLED in the keyset of the given keyset Handle, using the given key manager (instead of registered key managers) for keys supported by it. Keys not supported by the key manager are handled by matching registered key managers (if present), and keys with status!=ENABLED are skipped.

This enables custom treatment of keys, for example providing extra context (e.g. credentials for accessing keys managed by a KMS), or gathering custom monitoring/profiling information.

The returned set is usually later “wrapped” into a class that implements the corresponding Primitive-interface.

Return KeysetInfo representation of the managed keyset. The result does not contain any sensitive key material.

Trait Implementations

Return a string representation of the managed keyset. The result does not contain any sensitive key material.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.