Documentation ¶
Index ¶
- Constants
- func Decrypt(key [KeySize]byte, ciphertext []byte) ([]byte, error)
- func DecryptWithEncoding(key [KeySize]byte, encoding Encoding, encodedCiphertext string) ([]byte, error)
- func Encrypt(key [KeySize]byte, plaintext []byte) ([]byte, error)
- func EncryptWithEncoding(key [KeySize]byte, encoding Encoding, plaintext []byte) (string, error)
- type Encoding
Constants ¶
View Source
const (
// KeySize is the required key size, in bytes.
KeySize = 32
)
Variables ¶
This section is empty.
Functions ¶
func DecryptWithEncoding ¶
func DecryptWithEncoding(key [KeySize]byte, encoding Encoding, encodedCiphertext string) ([]byte, error)
DecryptWithEncoding is like Decrypt, but first decodes the ciphertext from string using the given Encoding.
Types ¶
Click to show internal directories.
Click to hide internal directories.