Documentation ¶
Index ¶
- func CheckPassword(password string, hash string) error
- func Contains(s []string, str string) bool
- func Decrypt(data []byte, passphrase string) ([]byte, error)
- func DecryptFile(filename string, passphrase string, decrypt bool) ([]byte, error)
- func Encrypt(data []byte, passphrase string) ([]byte, error)
- func EncryptFile(filename string, data []byte, passphrase string) error
- func GeneratePassword(passwordLength, minSpecialChar, minNum, minUpperCase int) string
- func GetPassphrase() string
- func HashAndSalt(pwd string) ([]byte, error)
- func IsEmailValid(s string) bool
- func IsLenStringValid(s string) bool
- func IsNameValid(s string) bool
- func IsPasswordValid(s string, i int) bool
- func IsUserNameValid(s string) bool
- func IsValidURL(s string) bool
- func NewUUID() string
- func RemoveDuplicate(xs *[]string)
- func Round(val float64, roundOn float64, places int) (newVal float64)
- func SetPassphrase(newpassphrase string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
Called in the auth controller. Is used to check if the password is correct with the user's password in the database.
func DecryptFile ¶
DecryptFile Decrypte un fichier
func EncryptFile ¶
EncryptFile Encrypte un fichier
func GeneratePassword ¶
GeneratePassword ...
func IsEmailValid ¶
IsEmailValid checks if the email provided passes the required structure and length.
func IsLenStringValid ¶
IsLenStringValid check lenght of string
func IsNameValid ¶
IsNameValid checks if the name provided respects the required elements
func IsPasswordValid ¶
IsPasswordValid checks if the password provided respects the required elements
func IsUserNameValid ¶
IsUserNameValid checks if the name provided respects the required elements
func RemoveDuplicate ¶
func RemoveDuplicate(xs *[]string)
RemoveDuplicate : Supression de doublons dans un tableau
func SetPassphrase ¶
func SetPassphrase(newpassphrase string)
SetPassphrase alimentation de la passphrase
Types ¶
This section is empty.