bcryptKit

package
v3.0.62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePasswords

func ComparePasswords(hashedPassword, plainPassword []byte) error

ComparePasswords 验证密码是否正确(对比 已哈希过的密码 与 原始明文密码 是否匹配。).

@param hashedPassword HashPassword() 的返回值 @param plainPassword 密码明文 @return err == nil: 已哈希过的密码 与 原始明文密码 匹配

func HashPassword

func HashPassword(password []byte) ([]byte, error)

HashPassword 加密用户密码(生成一个带盐(salt)的哈希值).

PS: 传参相同,多次执行的结果不同.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL