crypto

package
v0.0.0-...-3b7be81 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMismatchedHashAndPassword = errors.New("hashedPassword is not the hash of the given password")
)

Functions

func CompareHash

func CompareHash(hashedPassword, password string) error

func DataSign

func DataSign(data interface{}, key *rsa.PrivateKey) (string, error)

func GenerateSign

func GenerateSign() (*rsa.PrivateKey, error)

func HashString

func HashString(data string) string

func MarshalSign

func MarshalSign(key *rsa.PrivateKey) (privateKey, publicKey string)

func UnmarshalPrivate

func UnmarshalPrivate(privateKey string) (*rsa.PrivateKey, error)

func UnmarshalPublic

func UnmarshalPublic(publicKey string) (*rsa.PublicKey, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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