Documentation
¶
Index ¶
- func HmacSHA1(msg string, key string) (string, error)
- func HmacSHA256(msg string, key string) (string, error)
- func ISO10126Padding()
- func ISO10126Unpadding()
- func MD5(msg string) (string, error)
- func NewAES() *aseHelper
- func NewRSA() *rsaHelper
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5Unpadding(origData []byte) []byte
- func SHA1(msg string) (string, error)
- type Mode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ISO10126Padding ¶ added in v0.0.4
func ISO10126Padding()
ISO10126填充 原理:如果明文块少于 blockSize 个字节(按16字节分组即128bit,一般按秘钥字节数位分组步长),在明文块末尾补足相应数量的字节,最后一个字符值等于缺少的字符数,其他字符填充随机数。
func PKCS5Padding ¶ added in v0.0.4
PKCS5Padding 原理:如果明文块少于 blockSize 个字节(按16字节分组即128bit,一般按秘钥字节数位分组步长),在明文块末尾补足相应数量的字符,且每个字节的值等于缺少的字符数。 @param []byte ciphertext @param int blockSize
@return []byte
Types ¶
Click to show internal directories.
Click to hide internal directories.