crypto

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Curve25519Xchacha20poly1305 byte = iota
	GCPKMSXchacha20poly1305
	AWSKMSXchacha20poly1305

	HeaderSize = 1
)

Cipher suites used for encryption. Will always be the first byte of the encrypted message.

Variables

View Source
var (
	ErrNoCipherSuites       = errors.New("crypto: no cipher suites found")
	ErrMultipleCipherSuites = errors.New("crypto: more than one provider per section")
)

Error definitions

Functions

func ConcatByteSlices added in v0.0.2

func ConcatByteSlices(slices ...[]byte) []byte

ConcatByteSlices concatenates multiple byte slices and returns the resulting slice

Types

type Decrypter

type Decrypter interface {
	Decrypt(ciphertext []byte) ([]byte, error)
}

Decrypter is the interface that wraps the basic Decrypt method.

Decrypt decrypts the ciphertext.

type EncryptDecrypter

type EncryptDecrypter interface {
	Encrypter
	Decrypter
}

EncryptDecrypter is the interface that groups the basic Encrypt and Decrypt methods.

type Encrypter

type Encrypter interface {
	Encrypt(plaintext []byte) ([]byte, error)
}

Encrypter is the interface that wraps the basic Encrypt method.

Encrypt encrypts the plaintext message.

Directories

Path Synopsis
Package awskms encrypts the message using AWS KMS.
Package awskms encrypts the message using AWS KMS.
Package curve25519 implements the unauthenticated public-key encryption scheme.
Package curve25519 implements the unauthenticated public-key encryption scheme.
Package gcpkms encrypts the message using Google Cloud KMS.
Package gcpkms encrypts the message using Google Cloud KMS.
Package xchacha20poly1305 leverages the extended nonce variant XChaCha20-Poly1305 of the ChaCha20-Poly1305 AEAD as specified in https://tools.ietf.org/html/draft-arciszewski-xchacha-03.
Package xchacha20poly1305 leverages the extended nonce variant XChaCha20-Poly1305 of the ChaCha20-Poly1305 AEAD as specified in https://tools.ietf.org/html/draft-arciszewski-xchacha-03.

Jump to

Keyboard shortcuts

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