aes

package
v0.0.0-...-015e77e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CFB crypto.Mode = "cfb"
	CTR             = "ctr"
	GCM             = "gcm"
)

currently supported modes

Variables

This section is empty.

Functions

func DecryptCFB

func DecryptCFB(length crypto.KeyLen, secret, ciphertext []byte) ([]byte, error)

DecryptCFB supports AES128-CFB, AES192-CFB, and AES256-CFB decryption.

func DecryptCTR

func DecryptCTR(length crypto.KeyLen, secret, ciphertext []byte) ([]byte, error)

DecryptCTR supports AES128-CTR, AES192-CTR, and AES256-CTR decryption.

func DecryptGCM

func DecryptGCM(keyLen crypto.KeyLen, secret, ciphertext []byte) ([]byte, error)

DecryptGCM supports AES128-GCM, AES192-GCM, and AES256-GCM decryption.

func EncryptCFB

func EncryptCFB(length crypto.KeyLen, secret, plaintext []byte) ([]byte, error)

EncryptCFB supports AES128-CFB, AES192-CFB, and AES256-CFB encryption.

func EncryptCTR

func EncryptCTR(length crypto.KeyLen, secret, plaintext []byte) ([]byte, error)

EncryptCTR supports AES128-CTR, AES192-CTR, and AES256-CTR encryption.

func EncryptGCM

func EncryptGCM(keyLen crypto.KeyLen, secret, plaintext []byte) ([]byte, error)

EncryptGCM supports AES128-GCM, AES192-GCM, and AES256-GCM encryption.

Types

type CipherCall

type CipherCall func(length crypto.KeyLen, secret, data []byte) ([]byte, error)

CipherCall is function the prototype for the encryption and decryption.

Jump to

Keyboard shortcuts

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