Documentation
¶
Index ¶
- func DecryptData(encodedData string, key []byte) ([]byte, error)
- func EncryptData(data []byte, key []byte) (string, error)
- func GetDataEncryptionKey(userID string, decryptionKey string, dbPassword string) (string, error)
- func HashPassword(string, password string, secret string) string
- func ParsePrivateKey(text string) (*rsa.PrivateKey, error)
- func VerifyPassword(email string, password string, secret string, stored string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDataEncryptionKey ¶
func HashPassword ¶
HashPassword returns Argon2id password hash string with per-user random salt.
Output format (PHC-ish):
$argon2id$v=19$m=65536,t=1,p=4$<salt_b64>$<hash_b64>
secret: server-side pepper (optional). Keep out of DB.
func ParsePrivateKey ¶
func ParsePrivateKey(text string) (*rsa.PrivateKey, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.