Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AES ¶
type AES struct {
// contains filtered or unexported fields
}
func NewCryptAES ¶
func NewCryptAES(c AESConfiguration) *AES
type AESConfiguration ¶
type ChaCha20Configuration ¶
type Cipher ¶
type Cipher interface { // Encrypt encrypts the (binary) message and returns a hex-encoded binary ciphertext // or an error if the encryption failed. // // If the message is empty, the ciphertext is also empty and no error is returned. Encrypt(ctx context.Context, message []byte) (string, error) // Decrypt takes a hex-encoded binary ciphertext and decrypts it or returns an error if the decryption // failed. // // If the ciphertext is empty a nil byte slice is returned. Decrypt(ctx context.Context, encrypted string) ([]byte, error) }
Cipher provides methods for encrypt and decrypt string
type Noop ¶
type Noop struct {
// contains filtered or unexported fields
}
func NewNoop ¶
func NewNoop(c NoopConfiguration) *Noop
type NoopConfiguration ¶
type XChaCha20Poly1305 ¶
type XChaCha20Poly1305 struct {
// contains filtered or unexported fields
}
func NewCryptChaCha20 ¶
func NewCryptChaCha20(c ChaCha20Configuration) *XChaCha20Poly1305
Click to show internal directories.
Click to hide internal directories.