[−][src]Module tink_core::registry
Provides a container that for each supported key type holds a corresponding KeyManager
object,
which can generate new keys or instantiate the primitive corresponding to given key.
Registry is initialized at startup, and is later used to instantiate primitives for given keys
or keysets. Keeping KeyManager
s for all primitives in a single Registry (rather than having
a separate KeyManager
per primitive) enables modular construction of compound primitives
from "simple" ones, e.g., AES-CTR-HMAC AEAD encryption uses IND-CPA encryption and a MAC.
Note that regular users will usually not work directly with Registry, but rather via primitive
factories, which in the background query the Registry for specific KeyManager
s. Registry is
public though, to enable configurations with custom primitives and KeyManager
s.
Traits
KeyManager |
|
KmsClient |
|
Functions
clear_kms_clients | Remove all registered KMS clients. |
get_key_manager | Return the key manager for the given |
get_kms_client | Fetches a |
get_template_generator | Find a key template generator function by name. |
new_key | Generate a new key for the given key template as a serialized protobuf message. |
new_key_data | Generate a new |
primitive | Create a new primitive for the given serialized key using the |
primitive_from_key_data | Create a new primitive for the key given in the given |
register_key_manager | Register the given key manager. Does not allow overwrite of existing key managers. |
register_kms_client | Register a new KMS client |
register_template_generator | Register a key template generator function by name. |
template_names | Return all available key template generator names. |
Type Definitions
KeyTemplateGenerator |