algorithms

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChaCha20Cipher

type ChaCha20Cipher struct {
	// contains filtered or unexported fields
}

func NewChaCha20Cipher

func NewChaCha20Cipher(key []byte) (*ChaCha20Cipher, error)

func (*ChaCha20Cipher) Decrypt

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

func (*ChaCha20Cipher) Encrypt

func (c *ChaCha20Cipher) Encrypt(plaintext []byte) ([]byte, error)

func (*ChaCha20Cipher) GetNonce

func (c *ChaCha20Cipher) GetNonce() []byte

func (*ChaCha20Cipher) SetNonce

func (c *ChaCha20Cipher) SetNonce(nonce []byte) error

type SerpentCipher

type SerpentCipher struct {
	// contains filtered or unexported fields
}

func NewSerpentCipher

func NewSerpentCipher(key []byte) (*SerpentCipher, error)

func (*SerpentCipher) Decrypt

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

func (*SerpentCipher) Encrypt

func (c *SerpentCipher) Encrypt(plaintext []byte) ([]byte, error)

func (*SerpentCipher) GetNonce

func (c *SerpentCipher) GetNonce() []byte

func (*SerpentCipher) SetNonce

func (c *SerpentCipher) SetNonce(nonce []byte) error

Jump to

Keyboard shortcuts

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