password

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidCredentials     = "Invalid credentials." // #nosec G101
	ErrAuthenticationRequired = "Authentication required."
)

Variables

This section is empty.

Functions

func CompareHashAndPassword

func CompareHashAndPassword(ctx context.Context, hash, plaintextPassword string) (bool, *apierror.APIError)

CompareHashAndPassword compares a plaintext password against a hashed password.

func HashPassword

func HashPassword(ctx context.Context, plaintextPassword string) (string, *apierror.APIError)

HashPassword hashes a plaintext password using bcrypt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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