passhash

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BasicPrefix = "Basic "

Variables

View Source
var PasshashIter = 10000

As computing power grows, we should increase iter and salt bytes

View Source
var PasshashKeyBytes = 32
View Source
var PasshashSaltBytes = 8

Functions

func DecodeBasicAuth

func DecodeBasicAuth(auth string) (username, password string, ok bool)

func EncodeBasicAuth

func EncodeBasicAuth(username, password string) string

func NewPasshash

func NewPasshash(password string) (passhash, salt string, iter int)

func Passhash

func Passhash(pw, salt []byte, iter int) []byte

func PasswordMatches

func PasswordMatches(password, passhash, salt string, iter int) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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