crypto

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const MinimumPasswordLength = 16

MinimumPasswordLength the minimum password length.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext []byte, oracle *Oracle, out *os.File) error

func Encrypt

func Encrypt(plaintext []byte, oracle *Oracle, out *os.File) error

Types

type Oracle

type Oracle struct {
	Aead  cipher.AEAD
	Nonce []byte
}

The Oracle struct manages the encryption and decryption of data.

func NewOracle

func NewOracle(passphrase string) (*Oracle, error)

NewOracle creates a new Oracle struct.

func (*Oracle) Decrypt

func (c *Oracle) Decrypt(ciphertext []byte) ([]byte, error)

func (*Oracle) Encrypt

func (c *Oracle) Encrypt(plaintext []byte) []byte

Jump to

Keyboard shortcuts

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