password

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package password provides utilities for password hashing and verification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PlainHash

func PlainHash(password string) (*types.Document, error)

PlainHash hashes the password and returns the document that should be stored.

func PlainVerify

func PlainVerify(password string, doc *types.Document) error

PlainVerify verifies the password against the document returned by PlainHash.

The returned error is safe for logging, but should not be exposed to the client.

func SCRAMSHA1Hash added in v1.21.0

func SCRAMSHA1Hash(username, password string) (*types.Document, error)

SCRAMSHA1Hash computes SCRAM-SHA-1 credentials and returns the document that should be stored.

func SCRAMSHA256Hash added in v1.20.0

func SCRAMSHA256Hash(password string) (*types.Document, error)

SCRAMSHA256Hash computes SCRAM-SHA-256 credentials and returns the document that should be stored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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