package fakekms
import "github.com/google/tink/go/testing/fakekms"
Package fakekms provides a fake implementation of registry.KMSClient.
Normally, a 'keyURI' identifies a key that is stored remotely by the KMS, and every operation is executed remotely using a RPC call to the KMS, since the key should not be sent to the client. In this fake implementation we want to avoid these RPC calls. We achieve this by encoding the key in the 'keyURI'. So the client simply needs to decode the key and generate an AEAD out of it. This is of course insecure and should only be used in testing.
Index ¶
Functions ¶
func NewClient ¶
NewClient returns a fake KMS client which will handle keys with uriPrefix prefix. keyURI must have the following format: 'fake-kms://<base64 encoded aead keyset>'.
func NewKeyURI ¶
NewKeyURI returns a new, random fake KMS key URI.
Source Files ¶
- Version
- v1.7.0 (latest)
- Published
- Aug 10, 2022
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 3 months ago –
Tools for package owners.