cc2p1305_scrypt

package
v0.0.0-...-28a8982 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParamDefaults = Params{
	SaltSize:  32,
	NonceSize: chacha20poly1305.NonceSizeX,
	KeySize:   chacha20poly1305.KeySize,
}

Sane defaults

Functions

This section is empty.

Types

type Params

type Params struct {
	SaltSize  int
	NonceSize int
	KeySize   int
	Key       []byte
}

func Init

func Init(params Params) (*Params, error)

func (*Params) Decrypt

func (c *Params) Decrypt(data []byte) ([]byte, error)

Decrypt function based on chacha20poly1305 and scrypt

func (*Params) Encrypt

func (c *Params) Encrypt(data []byte) ([]byte, error)

Encrypt function based on chacha20poly1305 and scrypt

func (*Params) StreamDecrypt

func (c *Params) StreamDecrypt(r io.Reader, w io.Writer, chunkSize int) error

StreamDecrypt function based on chacha20poly1305 and scrypt

func (*Params) StreamEncrypt

func (c *Params) StreamEncrypt(r io.Reader, w io.Writer, chunkSize int) error

StreamEncrypt function based on chacha20poly1305 and scrypt

Jump to

Keyboard shortcuts

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