passwd

package
v0.0.0-...-944e809 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(barePass string) (encrypted Passwd, salt Salt)

密码加密, 每次都是新的salt

func Validate

func Validate(barePass string, encrypted Passwd, salt Salt) bool

验证密码

Types

type Passwd

type Passwd Salt

func ZeroPasswd

func ZeroPasswd() (ret Passwd)

type Salt

type Salt [32]byte

func NewSalt

func NewSalt() (ret Salt)

NewSalt 生成新的随机数

func ZeroSalt

func ZeroSalt() (ret Salt)

Jump to

Keyboard shortcuts

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