encrypt

package
v0.0.0-...-8b33ff4 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncryptAlgSha256 string = "SHA256"
	EncryptAlgSm3    string = "SM3"
)

Variables

View Source
var SupportEncryptAlg = map[string]bool{
	EncryptAlgSha256: true,
	EncryptAlgSm3:    true,
}

Functions

This section is empty.

Types

type Encrypt

type Encrypt struct {
	Alg     string // 加密算法
	Content string
}

func NewEncrypt

func NewEncrypt(alg, content string) (*Encrypt, error)

func (*Encrypt) Crypto

func (e *Encrypt) Crypto() (string, error)

hash并转为16进制字符串

func (*Encrypt) Hash

func (e *Encrypt) Hash() ([]byte, error)

hash

Jump to

Keyboard shortcuts

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