crypto

package
v0.0.0-...-0d1a7e0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2015 License: GPL-2.0, GPL-2.0-or-later Imports: 1 Imported by: 0

Documentation

Overview

contains two cryptographic functions for both storing and comparing passwords.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHash

func CompareHash(digest []byte, password string) bool

CompareHash compares bcrypt password with a plaintext one. Returns true if passwords match and false if they do not.

func ComparePwd

func ComparePwd(rawPwd, dbPwd string) bool

compare password rawPwd raw password, dbPwd in database

func GenPwd

func GenPwd(rawPwd string) string

generate password hash

func GenerateHash

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

GenerateHash generates bcrypt hash from plaintext password

Types

This section is empty.

Jump to

Keyboard shortcuts

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