util

package
v0.0.0-...-425066b Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2016 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// N is a CPU/memory cost
	N int32 = 16384

	R int32 = 8
	// P Parallelization
	P int32 = 1
)

Functions

func CompareHashPassword

func CompareHashPassword(password, hash string) (bool, error)

CompareHashPassword compares password hash by decoding and extracting the seed then calculating the hash and using constant time comparison to compare then.

func HashPassword

func HashPassword(password string) (string, error)

HashPassword returns a password has created using scrypt. return [salt] + scrypt([salt], [credential], N=16384, r=8, p=1, keyLen=32);

Types

This section is empty.

Jump to

Keyboard shortcuts

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