Version: v0.3.0 Latest Latest

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

Go to latest
Published: Mar 22, 2022 License: MIT Imports: 14 Imported by: 0




This section is empty.


View Source
var (
	ErrNonRSAPublicKey          = errors.New("non-rsa public key")
	ErrInvalidPublicKeyPemBlock = errors.New("invalid public key pem block")


func EncryptPassword

func EncryptPassword(password, salt string) string

func GenerateDeviceId

func GenerateDeviceId(prefix string) string

func GeneratePasswordSalt

func GeneratePasswordSalt() string

func GenerateRSAPemFile

func GenerateRSAPemFile(priKey *rsa.PrivateKey, priFilename, pubFilename string) error

func GenerateRSAPrivatePem

func GenerateRSAPrivatePem(priKey *rsa.PrivateKey, w io.Writer) error

func GenerateRSAPublicPem

func GenerateRSAPublicPem(pubKey *rsa.PublicKey, w io.Writer) error

func GenerateSalt

func GenerateSalt(n int) string

func GenerateToken

func GenerateToken() string

func GenerateTokenWithLength

func GenerateTokenWithLength(length int) string

func LoadRSAPrivateKeyFile

func LoadRSAPrivateKeyFile(priFilename string) (*rsa.PrivateKey, error)

func LoadRSAPublicKeyFile

func LoadRSAPublicKeyFile(priFilename string) (*rsa.PublicKey, error)

func LoadRSAPublicKeyFromBytes

func LoadRSAPublicKeyFromBytes(data []byte) (*rsa.PublicKey, error)

func MD5

func MD5(src string) string

func MD5Upper

func MD5Upper(src string) string

func Sha1

func Sha1(src string) string

func Sha1Upper

func Sha1Upper(src string) string

func Sha256

func Sha256(src string) string

func Sha256Upper

func Sha256Upper(src string) string

func Sha512

func Sha512(src string) string

func Sha512Upper

func Sha512Upper(src string) string

func Sha512_256

func Sha512_256(src string) string

func Sha512_256Upper

func Sha512_256Upper(src string) string


This section is empty.

Jump to

Keyboard shortcuts

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