hash

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BCrypt

type BCrypt int

BCrypt is the default password encryption scheme for Steranko. The integer value represents the complexity cost of the algorithm.

func (BCrypt) CompareHashedPassword

func (bc BCrypt) CompareHashedPassword(hashedValue string, plaintext string) (OK bool, rehash bool)

CompareHashedPassword checks that a hashedValue value matches the plaintext password.

func (BCrypt) HashPassword

func (bc BCrypt) HashPassword(plaintext string) (hashedValue string, error error)

HashPassword returns a hashed value for the password.

func (BCrypt) ID

func (bc BCrypt) ID() string

ID returns a unique identifier for this plugin.

type Plaintext

type Plaintext struct{}

Plaintext is an awful password encryption scheme that should NEVER be used outside of initial development.

func (Plaintext) CompareHashedPassword

func (p Plaintext) CompareHashedPassword(ciphertext string, plaintext string) (OK bool, rehash bool)

CompareHashedPassword checks that a ciphertext value matches the plaintext password.

func (Plaintext) HashPassword

func (p Plaintext) HashPassword(password string) (string, error)

HashPassword returns a hashed value for the password.

func (Plaintext) ID

func (p Plaintext) ID() string

ID returns a unique identifier for this plugin.

Jump to

Keyboard shortcuts

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