Documentation ¶
Index ¶
- Variables
- func AESDecrypt(key, data []byte) ([]byte, error)
- func AESEncrypt(key, data []byte) ([]byte, error)
- func AESVerifyKey(key, data []byte) (bool, error)
- func ChaCha20Decrypt(key, data []byte) ([]byte, error)
- func ChaCha20Encrypt(key, data []byte) ([]byte, error)
- func ChaCha20VerifyKey(key, data []byte) (bool, error)
- func Decrypt(data []byte, algorithm string, key []byte) ([]byte, error)
- func Encrypt(data []byte, algorithm string, key []byte) ([]byte, error)
- func VerifyKey(data []byte, algorithm string, key []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SaltSize = 32 // in bytes NonceSize = 24 // in bytes. taken from aead.NonceSize() KeySize = uint32(32) // KeySize is 32 bytes (256 bits). KeyTime = uint32(5) KeyMemory = uint32(1024 * 64) // KeyMemory in KiB. here, 64 MiB. KeyThreads = uint8(4) )
XChaCha variables
View Source
var ( // MethodsAvailable is a list of available methods MethodsAvailable = []string{"aes", "aes256", "chacha20", "chacha20poly1305", "none"} )
Functions ¶
func AESDecrypt ¶
AESDecrypt returns decrypted data and errors
func AESEncrypt ¶
AESEncrypt returns encrypted data and errors
func AESVerifyKey ¶
AESVerifyKey verify the password
func ChaCha20Decrypt ¶
ChaCha20Decrypt decrypts data with ChaCha20 Poly Algorithm and returns decrypted data and errors
func ChaCha20Encrypt ¶
ChaCha20Encrypt encrypts data with ChaCha20 Poly Algorithm and returns encrypted data and errors
func ChaCha20VerifyKey ¶
ChaCha20VerifyKey verify the password
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.