crypt

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 9 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCrypt = &Crypt{
	key: []byte("x^)dixf&*1$free]"),
}

Functions

func DecodeBase64

func DecodeBase64(rawStr string) (res string)

func EncodeBase64

func EncodeBase64(str string) (res string)

Types

type Crypt

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

func NewCrptWithKey

func NewCrptWithKey(key []byte) (c *Crypt)

func NewCrypt

func NewCrypt(password string) (c *Crypt)

func (*Crypt) AesDecrypt

func (that *Crypt) AesDecrypt(crypted []byte) ([]byte, error)

func (*Crypt) AesEncrypt

func (that *Crypt) AesEncrypt(origData []byte) ([]byte, error)

func (*Crypt) BcryptHash added in v1.0.0

func (that *Crypt) BcryptHash(password string) (string, error)

func (*Crypt) BcryptVerify added in v1.0.0

func (that *Crypt) BcryptVerify(hashedPassword, password string) error

Jump to

Keyboard shortcuts

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