bcrypt

package
v0.0.0-...-3f7294d Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GENSALT_DEFAULT_LOG2_ROUNDS = 10
	BCRYPT_SALT_LEN             = 16
	BLOWFISH_NUM_ROUNDS         = 16
)

Variables

View Source
var (
	P_orig = []int{
		0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344,
		0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89,
		0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c,
		0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917,
		0x9216d5d9, 0x8979fb1b,
	}
	S_orig = []int{}/* 1024 elements not displayed */

)

Functions

func CheckPw

func CheckPw(password, hashed string) bool

func GenSalt

func GenSalt(prefix string, logRounds int) string

func HashPw

func HashPw(password string, salt string) string

Types

type BCrypt

type BCrypt struct {
	// contains filtered or unexported fields
}

func NewBCrypt

func NewBCrypt() (rcvr *BCrypt)

Jump to

Keyboard shortcuts

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