keywrapper

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LocalKeyURIPrefix = "local-lock://"

LocalKeyURIPrefix for locally stored keys.

Variables

This section is empty.

Functions

func New

func New(secretLock secretlock.Service, keyURI string) (tink.AEAD, error)

New creates a new key wrapper with the given uriPrefix and a local secretLock service.

Types

type LocalAEAD

type LocalAEAD struct {
	// contains filtered or unexported fields
}

LocalAEAD represents a local kms aead service invoking a local SecretLock to a particular key URI. Instances of LocalAEAD are invoked internally by Tink for wrapping/unwrapping keys. It must not be used elsewhere.

func (*LocalAEAD) Decrypt

func (a *LocalAEAD) Decrypt(ciphertext, additionalData []byte) ([]byte, error)

Decrypt LocalAEAD decrypts the data and verified the additional data.

func (*LocalAEAD) Encrypt

func (a *LocalAEAD) Encrypt(plaintext, additionalData []byte) ([]byte, error)

Encrypt LocalAEAD encrypts plaintext with addtionaldata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL