encdec

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKeyURI

func NewKeyURI() (string, error)

NewKeyURI returns a new, random KMS key URI.

Types

type CryptoHandler

type CryptoHandler interface {
	// Encrypts the plain data and returns a cipher data
	Encrypt(ctx context.Context, plain []byte) ([]byte, error)
	// Decrypts the cipher data and returns plain data
	Decrypt(ctx context.Context, cipher []byte) ([]byte, error)
}

Crypto provides methods for encrypting and decrypting data

type CryptoProvider

type CryptoProvider interface {
	CryptoHandler(ctx context.Context) CryptoHandler
}

type TinkConfiguration

type TinkConfiguration struct {
	KekUri     string
	KeySetData string
}

type TinkCryptoHandler

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

func NewTinkCryptoHandler

func NewTinkCryptoHandler(c *TinkConfiguration) *TinkCryptoHandler

func (*TinkCryptoHandler) Decrypt

func (h *TinkCryptoHandler) Decrypt(ctx context.Context, cipher []byte) ([]byte, error)

func (*TinkCryptoHandler) Encrypt

func (h *TinkCryptoHandler) Encrypt(ctx context.Context, plain []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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