Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeySize = 32 NonceSize = 8 TagSize = 32 )
View Source
const (
NonceSizeX = 24
)
Variables ¶
View Source
var ( ErrOpen = errors.New("chacha20blake3: error decrypting ciphertext") ErrBadKeyLength = errors.New("chacha20blake3: bad key length for ChaCha20Blake3. 32 bytes required") ErrBadNonceLength = errors.New("chacha20blake3: bad nonce length for ChaCha20Blake3. 8 bytes required") )
View Source
var (
ErrBadNonceXLength = errors.New("chacha20blake3: bad nonce length for XChaCha20Blake3. 24 bytes required")
)
Functions ¶
This section is empty.
Types ¶
type ChaCha20Blake3 ¶
type ChaCha20Blake3 struct {
// contains filtered or unexported fields
}
func New ¶
func New(key []byte) (*ChaCha20Blake3, error)
func (*ChaCha20Blake3) NonceSize ¶
func (*ChaCha20Blake3) NonceSize() int
func (*ChaCha20Blake3) Open ¶
func (cipher *ChaCha20Blake3) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error)
func (*ChaCha20Blake3) Overhead ¶
func (*ChaCha20Blake3) Overhead() int
func (*ChaCha20Blake3) Seal ¶
func (cipher *ChaCha20Blake3) Seal(dst, nonce, plaintext, additionalData []byte) []byte
type XChaCha20Blake3 ¶
type XChaCha20Blake3 struct {
// contains filtered or unexported fields
}
func NewX ¶
func NewX(key []byte) (*XChaCha20Blake3, error)
func (*XChaCha20Blake3) NonceSize ¶
func (*XChaCha20Blake3) NonceSize() int
func (*XChaCha20Blake3) Open ¶
func (x *XChaCha20Blake3) Open(dst, nonce, ciphertext, additionalData []byte) ([]byte, error)
func (*XChaCha20Blake3) Overhead ¶
func (*XChaCha20Blake3) Overhead() int
func (*XChaCha20Blake3) Seal ¶
func (x *XChaCha20Blake3) Seal(dst, nonce, plaintext, additionalData []byte) []byte
Click to show internal directories.
Click to hide internal directories.