crypto

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsHashString

func IsHashString(str string) bool

IsHashString ...

func RandBytes

func RandBytes(size int) []byte

RandBytes ...

func RandPass

func RandPass(length int, count ...int) string

RandPass ...

func SHA256Sum

func SHA256Sum(str string) string

SHA256Sum ...

Types

type Crypto

type Crypto struct {
	// contains filtered or unexported fields
}

Crypto ...

func New

func New(salt []byte) *Crypto

New ...

func (*Crypto) AESKey

func (c *Crypto) AESKey(userPass, dbPass string) string

AESKey ...

func (*Crypto) DecryptData

func (c *Crypto) DecryptData(key, cipherData string) (string, error)

DecryptData ...

func (*Crypto) EncryptData

func (c *Crypto) EncryptData(key, plainData string) (string, error)

EncryptData ...

func (*Crypto) EncryptUserPass

func (c *Crypto) EncryptUserPass(userID, userPass string) string

EncryptUserPass ...

func (*Crypto) ValidateUserPass

func (c *Crypto) ValidateUserPass(userID, userPass, dbPass string) bool

ValidateUserPass ...

Jump to

Keyboard shortcuts

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