crypto

package
v0.0.0-...-7faa966 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMalformedCiphertext = fmt.Errorf("malformed ciphertext")
)

Functions

This section is empty.

Types

type AES

type AES struct {
	EncryptionKey [32]byte
}

AES encrypts and decrypts data using AES encryption

func (*AES) Decrypt

func (a *AES) Decrypt(ciphertext []byte) (plaintext []byte, err error)

Decrypt decrypts AES-encoded data slightly modified from original: https://github.com/gtank/cryptopasta/blob/master/encrypt.go

func (*AES) Encrypt

func (a *AES) Encrypt(plaintext []byte) (ciphertext []byte, err error)

Encrypt encrypts data using AES encryption slightly modified from original: https://github.com/gtank/cryptopasta/blob/master/encrypt.go

type Decryptor

type Decryptor func(ciphertext []byte) (plaintext []byte, err error)

Decryptor is a function that decrypts data

type Encryptor

type Encryptor func(plaintext []byte) (ciphertext []byte, err error)

Encryptor is a function that encrypts data

Jump to

Keyboard shortcuts

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