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 SecretsProvider) *AES
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{}
Noop is default cipher implementation witch does not do encryption
type SecretsProvider ¶ added in v1.3.0
type XChaCha20Poly1305 ¶
type XChaCha20Poly1305 struct {
// contains filtered or unexported fields
}
func NewCryptChaCha20 ¶
func NewCryptChaCha20(c SecretsProvider) *XChaCha20Poly1305
Click to show internal directories.
Click to hide internal directories.