Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptString ¶
DecryptString расшифровывает строку формата "v1:"+base64(nonce||ciphertext).
func EncryptString ¶
EncryptString шифрует строку AES-GCM, формат: "v1:" + base64(nonce||ciphertext).
func HashPassword ¶
HashPassword возвращает sha256(password + salt).
func SetAESKeyFromPassphrase ¶
SetAESKeyFromPassphrase принимает любую строку и производит из неё 32-байтный ключ (sha256).
func SetAESKeyRaw ¶
SetAESKeyRaw задаёт ключ ровно 16/24/32 байта (AES-128/192/256).
func SetPasswordSalt ¶
func SetPasswordSalt(salt string)
SetPasswordSalt инициализирует глобальную соль (pepper).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.