extensions

package module
v0.0.0-...-9fe68ce Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncryptionExtensionName = "envelopeencryption"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EncType

type EncType int
const (
	TINK EncType = iota
	TPM
	SHARED
	KMS
)

type EncryptionExtension

type EncryptionExtension struct {
	KeyUri string  `json:"key_uri,omitempty"`
	DEK    string  `json:"dek"`
	Type   EncType `json:"type"`
	// contains filtered or unexported fields
}

func NewEncryptionExtension

func NewEncryptionExtension(conf *EncryptionExtension) (*EncryptionExtension, error)

func (*EncryptionExtension) Decrypt

func (d *EncryptionExtension) Decrypt(raw []byte, aad []byte) (decrypted []byte, err error)

func (*EncryptionExtension) Encrypt

func (d *EncryptionExtension) Encrypt(raw []byte, aad []byte) (encrypted []byte, err error)

func (*EncryptionExtension) GetType

Jump to

Keyboard shortcuts

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