Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCaasKmsClient ¶ added in v0.0.11
NewCaasKmsClient returns a KMS client which will handle keys with uriPrefix prefix. keyURI must have the following format: 'caas-kms://<base64 encoded aead keyset>'.
func RegisterCustomKMS ¶ added in v0.0.11
func RegisterCustomKMS() error
RegisterCustomKMS registers the custom KMS client with Tink's registry
Types ¶
type CryptoHandler ¶
type CryptoHandler interface { // Encrypts the plain data and returns a cipher data Encrypt(ctx context.Context, plain, associatedData []byte) ([]byte, error) // Decrypts the cipher data and returns plain data Decrypt(ctx context.Context, cipher, associatedData []byte) ([]byte, error) }
Crypto provides methods for encrypting and decrypting data
type CryptoProvider ¶
type CryptoProvider interface {
CryptoHandler(ctx context.Context) CryptoHandler
}
type CustomKMSClient ¶ added in v0.0.11
type CustomKMSClient struct {
// contains filtered or unexported fields
}
CustomKMSClient implements the registry.KMSClient interface
func NewCustomKMSClient ¶ added in v0.0.11
func NewCustomKMSClient() *CustomKMSClient
NewCustomKMSClient creates a new instance of CustomKMSClient
func (*CustomKMSClient) CreateKey ¶ added in v0.0.11
func (c *CustomKMSClient) CreateKey() (string, error)
CreateKey generates a new key and returns its URI
func (*CustomKMSClient) GetAEAD ¶ added in v0.0.11
func (c *CustomKMSClient) GetAEAD(keyURI string) (tink.AEAD, error)
GetAEAD returns an AEAD primitive for the given key URI
func (*CustomKMSClient) Supported ¶ added in v0.0.11
func (c *CustomKMSClient) Supported(keyURI string) bool
Supported checks if the given key URI is supported by this KMS client
type TinkConfiguration ¶
type TinkCryptoHandler ¶
type TinkCryptoHandler struct {
// contains filtered or unexported fields
}
func NewTinkCryptoHandler ¶
func NewTinkCryptoHandler(c *TinkConfiguration) (*TinkCryptoHandler, error)
Click to show internal directories.
Click to hide internal directories.