package password

import "git.dotya.ml/mirre-mt/pcmt/modules/password"

Index

Functions

func Argon

func Argon(password string) (*argon2.Raw, error)

Argon accepts a password string and returns hash and salt byte slices, or an error.

func ArgonDecode

func ArgonDecode(digest []byte) (*argon2.Raw, error)

ArgonDecode attempts to decode the given byte slice into an argon raw struct.

func ArgonVerify

func ArgonVerify(password string, digest []byte) (bool, error)

ArgonVerify checks that the provided password matches the one used to create the provided digest, returns a bool and an error.

func Compare

func Compare(oldHash []byte, password string) bool

func GetHash

func GetHash(password string) ([]byte, error)

Source Files

argon.go password.go

Version
v0.0.0-20230910121657-4d10510f5ba4 (latest)
Published
Sep 10, 2023
Platform
linux/amd64
Imports
4 packages
Last checked
1 month ago

Tools for package owners.