crypto

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AES = "AES"
	RSA = "RSA"
)

consts

Variables

This section is empty.

Functions

func NewDecryptor

func NewDecryptor(alog string) cccsp.Decryptor

NewDecryptor creates a new decryptor

func NewEncryptor

func NewEncryptor(alog string) cccsp.Encryptor

NewEncryptor creates a new encryptor

Types

type AESCBCPKCS7Opts

type AESCBCPKCS7Opts struct {
	// IV is the initialization vector to be used by the underlying cihper.
	IV []byte

	// PRNG is an interface of a PRNG to be used by the underlying cihper.
	PRNG io.Reader
}

AESCBCPKCS7Opts contains options for AES encryption in CBC mode with PKCS7 padding.

type RSAOAEPOpts

type RSAOAEPOpts struct {
	Label []byte
	Hash  hash.Hash
}

RSAOAEPOpts contains options for RSA-OAEP encryption.

type RSAPKCS1v15Opts

type RSAPKCS1v15Opts struct{}

RSAPKCS1v15Opts contains options for RSA and the padding scheme from PKCS#1 v1.5

Jump to

Keyboard shortcuts

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