crypto

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

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

Go to latest
Published: Nov 29, 2019 License: Apache-2.0 Imports: 17 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(src string) ([]byte, error)

func Base64Encode

func Base64Encode(src []byte) string

func Base64URLDecode

func Base64URLDecode(src string) ([]byte, error)

func Base64URLEncode

func Base64URLEncode(src []byte) string

func Decrypt

func Decrypt(data, key []byte) ([]byte, error)

func Encrypt

func Encrypt(data, key []byte) ([]byte, error)

func GetMD5Content

func GetMD5Content(content string) string

func GetMD5Content2

func GetMD5Content2(content []byte) string

func Md5

func Md5(data []byte) []byte

func Md5Str

func Md5Str(data []byte) string

func RandBytes

func RandBytes(c int) ([]byte, error)

func RandInt63

func RandInt63(max int64) int64

func RandNumStr

func RandNumStr(l int) string

func SaltPassword

func SaltPassword(password string) []byte

func SaltPassword2

func SaltPassword2(password string) []byte

func SimpleGuid

func SimpleGuid() string

func VerifyPassword

func VerifyPassword(stored []byte, password string) bool

func VerifyPassword2

func VerifyPassword2(stored []byte, password string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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