Documentation ¶
Overview ¶
Credit
Index ¶
- Constants
- func DecodeFromHex(data []byte) ([]byte, error)
- func DecodeString(data string) ([]byte, error)
- func Decrypt(ciphertext []byte, key []byte) (plaintext []byte, err error)
- func EncodeToHex(data []byte) []byte
- func Encrypt(plaintext []byte, key []byte) (ciphertext []byte, err error)
- func NewEncodedKey() ([]byte, error)
- func NewEncryptionKey() ([]byte, error)
Constants ¶
View Source
const EncryptionKeySize = 32 // 32 bytes for AES-256
Variables ¶
This section is empty.
Functions ¶
func DecodeFromHex ¶
func DecodeString ¶
func EncodeToHex ¶
func NewEncodedKey ¶
func NewEncryptionKey ¶
NewEncryptionKey generates a random 256-bit key for Encrypt() and Decrypt().
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.