Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomBytes ¶
func RandomString ¶
func RandomUrlSafeString ¶
Types ¶
type SimpleEncryptor ¶
type SimpleEncryptor interface { Encrypt(data []byte) ([]byte, error) Decrypt(data []byte) ([]byte, error) }
This is a simple encryptor interface that does not support crypto configuration keys, IVs, etc. It is meant to be used for simple encryption/decryption tasks for internal data security. This is not meant to be used for secure communication
func NewAesEncryptor ¶
func NewAesEncryptor(salt, key string) (SimpleEncryptor, error)
Based on: https://go.dev/src/crypto/cipher/example_test.go https://pkg.go.dev/golang.org/x/crypto/scrypt
Click to show internal directories.
Click to hide internal directories.