Documentation ¶
Index ¶
- type Builder
- type KMSEncryptor
- type NoOpEncryptor
- type Service
- func (s *Service) AEAD() (tink.AEAD, error)
- func (s *Service) Decrypt(encrypted api.Encrypted) ([]byte, error)
- func (s *Service) DecryptJSON(encrypted api.Encrypted, v any) error
- func (s *Service) Encrypt(cleartext []byte, dest api.Encrypted) error
- func (s *Service) EncryptJSON(v any, dest api.Encrypted) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶ added in v0.363.0
type Builder struct {
// contains filtered or unexported fields
}
Builder constructs a DataEncryptor when used with a provider. Use a chain of With* methods to configure the builder.
func NewBuilder ¶ added in v0.363.0
func NewBuilder() Builder
func (Builder) Build ¶ added in v0.363.0
func (b Builder) Build(ctx context.Context, provider api.KeyStoreProvider) (api.DataEncryptor, error)
type KMSEncryptor ¶ added in v0.363.0
type KMSEncryptor struct {
// contains filtered or unexported fields
}
KMSEncryptor encrypts and decrypts using a KMS key via tink.
func NewKMSEncryptorWithKMS ¶ added in v0.363.0
func (*KMSEncryptor) Decrypt ¶ added in v0.363.0
func (k *KMSEncryptor) Decrypt(encrypted api.Encrypted) ([]byte, error)
func (*KMSEncryptor) Encrypt ¶ added in v0.363.0
func (k *KMSEncryptor) Encrypt(cleartext []byte, dest api.Encrypted) error
func (*KMSEncryptor) GetEncryptedKeyset ¶ added in v0.363.0
func (k *KMSEncryptor) GetEncryptedKeyset() []byte
type NoOpEncryptor ¶ added in v0.363.0
type NoOpEncryptor struct{}
NoOpEncryptor does not encrypt and just passes the input as is.
func NewNoOpEncryptor ¶ added in v0.363.0
func NewNoOpEncryptor() NoOpEncryptor
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AEAD ¶ added in v0.370.0
AEAD returns the AEAD instance used by the encryptor. TODO: Remove this method once we have a better way to handle this.
func (*Service) DecryptJSON ¶
DecryptJSON decrypts the given encrypted object and stores it in the provided destination.
Click to show internal directories.
Click to hide internal directories.