ssha

package module
v0.0.0-...-bbc210a Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHash

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

GetHash returns the SHA-1 hash of an SSHA hash

func GetHashParts

func GetHashParts(hash string) ([]byte, []byte, error)

GetHashParts returns the SSHA hash' Salt and SHA-1 hash

func GetSalt

func GetSalt(hash string) ([]byte, error)

GetSalt returns the SSHA hash salt

func IsSSHA

func IsSSHA(hash string) bool

IsSSHA checks if a particular string is a SSHA hash or not

func NewHash

func NewHash(in []byte) ([]byte, error)

NewHash will generate a new SSHA hash with a random salt and return it

func NewHashToString

func NewHashToString(in []byte) (string, error)

NewHashToString will generate a new SSHA hash, with a random salt, and return it as string, Base64 Encoded, and including the {SSHA} in the beginning

func VerifyHash

func VerifyHash(hash, password string) (bool, error)

VerifyHash accepts a SSHA string, as well as a plaintext password, and checks whether this password is correct or not

Types

This section is empty.

Jump to

Keyboard shortcuts

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