kdf

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultParams = Params{
	Time:   3,
	Memory: 32 * 1024,
	Iter:   10000,
	Hmac:   sha256.New,
	Scrypt: gsk.DefaultParams,
	Cost:   10,
}
View Source
var KeyLen = 32
View Source
var SaltLen = 32

Functions

func Argon2i

func Argon2i(reader io.Reader, params Params, format bool) (string, error)

Argon2i returns Argon2i hash of content in reader

func Argon2id

func Argon2id(reader io.Reader, params Params, format bool) (string, error)

Argon2id returns Argon2id hash of content in reader

func Bcrypt

func Bcrypt(reader io.Reader, params Params, format bool) (string, error)

Bcrypt returns Bcrypt hash of content in reader

func PBKDF2

func PBKDF2(reader io.Reader, params Params, format bool) (string, error)

PBKDF2 returns PBKDF2 hash of content in reader

func Scrypt

func Scrypt(reader io.Reader, params Params, format bool) (string, error)

Scrypt returns Scrypt hash of content in reader

func ScryptT

func ScryptT(reader io.Reader, params Params, format bool) (string, error)

ScryptT returns ScryptT hash of content in reader, in tarsnap format

Types

type Params

type Params struct {
	Time   uint32
	Memory uint32
	Iter   uint32
	Hmac   func() hash.Hash
	Scrypt gsk.Params
	Cost   int
}

Jump to

Keyboard shortcuts

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