Documentation
¶
Index ¶
- Constants
- func ComparePasswordAndHash(password, encodedHash *string) (match bool, err error)
- func CreateHash(password *string) (string, error)
- func GetLogLevel() int
- func LogAlways(application, message string)
- func LogError(application, message string)
- func LogInfo(application, message string)
- func LogWarn(application, message string)
- func RandomBytes(length uint32) ([]byte, error)
- func RandomString(length uint32) (string, error)
- func RandomStringCompare(stringOne, stringTwo *string) (bool, error)
- func SetLogLevel(level int)
- type UsedHashParams
Constants ¶
View Source
const ( // Log level constants LogLevelOff = 0 LogLevelInfo = 1 LogLevelWarn = 2 LogLevelError = 3 )
Variables ¶
This section is empty.
Functions ¶
func ComparePasswordAndHash ¶
func CreateHash ¶
func GetLogLevel ¶
func GetLogLevel() int
func LogAlways ¶
func LogAlways(application, message string)
Always writes the message to output, useful for service messages that should always be shown
func LogError ¶
func LogError(application, message string)
Logging for Errors, everything that was unexpected and dagerus
func LogInfo ¶
func LogInfo(application, message string)
Logging for informations that could be handy for debugging a problem
func LogWarn ¶
func LogWarn(application, message string)
Logging for Warnings that might be problematic, but are not specific errors
func RandomBytes ¶
func RandomString ¶
func RandomStringCompare ¶
RandomStringCompare decodes the strings and cryptographically compares them, returns true if they match
func SetLogLevel ¶
func SetLogLevel(level int)
Types ¶
type UsedHashParams ¶
type UsedHashParams struct {
Memory uint32
Iterations uint32
Parallelism uint8
SaltLength uint32
KeyLength uint32
Salt []byte
// contains filtered or unexported fields
}
func DecodeHash ¶
func DecodeHash(encodedHash *string) (params UsedHashParams, err error)
Click to show internal directories.
Click to hide internal directories.