Documentation ¶
Index ¶
- Variables
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(src string, key []byte) ([]byte, error)
- func MD5String(key string, length int) string
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func RandString(length int) string
- type Aes
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyContent = errors.New("encrpty plain content empty") ErrNotFull = errors.New("crypto/cipher: input not full blocks") )
Functions ¶
func AesDecrypt ¶
func NewECBDecrypter ¶
NewECBDecrypter returns a BlockMode which decrypts in electronic code book mode, using the given Block.
func NewECBEncrypter ¶
NewECBEncrypter returns a BlockMode which encrypts in electronic code book mode, using the given Block.
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func RandString ¶
生成指定长度的随机字符串 https://colobu.com/2018/09/02/generate-random-string-in-Go/
Types ¶
Click to show internal directories.
Click to hide internal directories.