hash

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: LGPL-2.1 Imports: 10 Imported by: 0

Documentation

Overview

Package hash is build to support multiple hashing algorithms with different parameters across projects.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultBcrypt = &go_nuntio.Bcrypt{
		Cost: int32(bcrypt.DefaultCost),
	}
)
View Source
var (
	DefaultScrypt = &go_nuntio.Scrypt{
		SignerKey:     "",
		SaltSeparator: "Bw==",
		Rounds:        8,
		MemCost:       14,
		P:             1,
		KeyLen:        32,
	}
)

Functions

func Key

func Key(password, salt []byte, signerKey, saltSeparator string, rounds, memCost, p, keyLen int) ([]byte, error)

Types

type Hash

type Hash interface {
	Generate(password string) (*go_nuntio.Hash, error)
	Compare(password string, hashModel *go_nuntio.Hash) error
}

func New

func New(config *go_nuntio.Config) Hash

Jump to

Keyboard shortcuts

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