package
1.0.0
Repository: https://github.com/rockchinq/campux.git
Documentation: pkg.go.dev

# Functions

CheckHash is like ComparePasswordAndHash, except it also returns the params that the hash was created with.
ComparePasswordAndHash performs a constant-time comparison between a plain-text password and Argon2id hash, using the parameters and salt contained in the hash.
CreateHash returns a Argon2id hash of a plain-text password using the provided algorithm parameters.
DecodeHash expects a hash created from this package, and parses it to return the params used to create it, as well as the salt and key (password hash).
No description provided by the author
No description provided by the author
随机生成一个包含小写字母和数字的字符串,长度为8 用于生成用户初始密码.
生成jwt token.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MD5 encrypts a string with md5 algorithm.
No description provided by the author
No description provided by the author
解析jwt token.
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author

# Variables

DefaultParams provides some sane default parameters for hashing passwords.
ErrIncompatibleVariant is returned by ComparePasswordAndHash if the provided hash was created using a unsupported variant of Argon2.
ErrIncompatibleVersion is returned by ComparePasswordAndHash if the provided hash was created using a different version of Argon2.
ErrInvalidHash in returned by ComparePasswordAndHash if the provided hash isn't in the expected format.

# Structs

Params describes the input parameters used by the Argon2id algorithm.

# Type aliases

No description provided by the author
No description provided by the author