Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRandSalt ¶
func HashPermissionPasswords ¶
func HashPermissionPasswords(perms map[string]string, argonSettings ArgonSettings) (map[string]HashedPassword, error)
func SaltFromHex ¶
Types ¶
type ArgonSettings ¶ added in v0.0.3
type ArgonSettings struct {
ArgonTime uint32 `json:"argon_time"`
ArgonMemory uint32 `json:"argon_memory"`
ArgonThreads uint8 `json:"argon_threads"`
ArgonHashSize uint32 `json:"argon_hash_size"`
}
func NewArgonDefaultSettings ¶ added in v0.0.3
func NewArgonDefaultSettings() ArgonSettings
func NewArgonSettings ¶ added in v0.0.3
func NewArgonSettings(argonTime uint32, argonMemory uint32, argonThreads uint8, argonHashSize uint32) ArgonSettings
type HashedPassword ¶
type HashedPassword struct {
Hash []byte `json:"hash"`
Salt []byte `json:"salt"`
ArgonSettings
}
func GetHashedPassword ¶
func GetHashedPassword(password string, salt []byte, argonSettings ArgonSettings) HashedPassword
Click to show internal directories.
Click to hide internal directories.