Documentation ¶
Overview ¶
Package internalregistry provides a container for functionality that is required across Tink similar to the `registry` but isn't part of the public API.
Index ¶
- func AllowKeyDerivation(typeURL string) error
- func CanDeriveKeys(typeURL string) bool
- func ClearMonitoringClient()
- func DeriveKey(keyTemplate *tinkpb.KeyTemplate, pseudorandomness io.Reader) (*tinkpb.KeyData, error)
- func GetMonitoringClient() monitoring.Client
- func RegisterMonitoringClient(client monitoring.Client) error
- type DerivableKeyManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowKeyDerivation ¶
AllowKeyDerivation adds the type URL to derivableKeyManagers if the corresponding key manager is in the registry and implements key derivation.
func CanDeriveKeys ¶
CanDeriveKeys returns true if typeURL is in derivableKeyManagers.
func ClearMonitoringClient ¶
func ClearMonitoringClient()
ClearMonitoringClient removes the registered monitoring client.
func DeriveKey ¶
func DeriveKey(keyTemplate *tinkpb.KeyTemplate, pseudorandomness io.Reader) (*tinkpb.KeyData, error)
DeriveKey derives a new key from template and pseudorandomness.
func GetMonitoringClient ¶
func GetMonitoringClient() monitoring.Client
GetMonitoringClient returns the registered monitoring client.
func RegisterMonitoringClient ¶
func RegisterMonitoringClient(client monitoring.Client) error
RegisterMonitoringClient registers a client that can create loggers.
Types ¶
type DerivableKeyManager ¶
type DerivableKeyManager interface { registry.KeyManager // KeyMaterialType returns the key material type of the key manager. KeyMaterialType() tinkpb.KeyData_KeyMaterialType // DeriveKey derives a new key from serializedKeyFormat and pseudorandomness. // // Note: The given parameter pseudorandomness may only produce a finite amount // of randomness. Implementions must obtain the pseudorandom bytes needed // before producing the key. DeriveKey(serializedKeyFormat []byte, pseudorandomness io.Reader) (proto.Message, error) }
DerivableKeyManager is a special type of KeyManager that can derive new keys.