crypto

package
v0.0.0-...-da9a50a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKey

func GenerateKey(size int) ([]byte, error)

func KeyWrap

func KeyWrap(kek []byte, key []byte) []byte

func PaddedReader

func PaddedReader(r io.Reader, blockSize byte, insertPadLengthAll bool) io.Reader

insertPadLengthAll = true means PKCS#7 (padding length inserted in each padding slot), otherwise false means padding length inserted only in the last slot (the rest is random bytes)

Types

type ContentKey

type ContentKey []byte

type Decrypter

type Decrypter interface {
	Decrypt(key ContentKey, r io.Reader, w io.Writer) error
}

type Encrypter

type Encrypter interface {
	Encrypt(key ContentKey, r io.Reader, w io.Writer) error
	GenerateKey() (ContentKey, error)
	Signature() string
}

func NewAESCBCEncrypter

func NewAESCBCEncrypter() Encrypter

func NewAESEncrypter_CONTENT_KEY

func NewAESEncrypter_CONTENT_KEY() Encrypter

func NewAESEncrypter_FIELDS

func NewAESEncrypter_FIELDS() Encrypter

func NewAESEncrypter_PUBLICATION_RESOURCES

func NewAESEncrypter_PUBLICATION_RESOURCES() Encrypter

func NewAESEncrypter_USER_KEY_CHECK

func NewAESEncrypter_USER_KEY_CHECK() Encrypter

func NewAESGCMEncrypter

func NewAESGCMEncrypter() Encrypter

Jump to

Keyboard shortcuts

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