Documentation ¶
Index ¶
- func AesCbcDecrypt(cipherText, key, ivAes []byte) ([]byte, error)
- func AesCbcEncrypt(plainText, key, ivAes []byte) ([]byte, error)
- func AesCtrDecrypt(cipherText, key, ivAes []byte) ([]byte, error)
- func AesCtrEncrypt(plainText, key, ivAes []byte) ([]byte, error)
- func DesCbcDecrypt(cipherText, key, ivDes []byte) ([]byte, error)
- func DesCbcEncrypt(plainText, key, ivDes []byte) ([]byte, error)
- func GetRsaKey(privateKeyPrefix, privateFileName string, ...) error
- func HashInt(s string) int64
- func HmacSha1(key, val string) []byte
- func HmacSha512(key, val string) []byte
- func Md5(b []byte) []byte
- func Md5Hex(b []byte) string
- func PKCS5Padding(plainText []byte, blockSize int) []byte
- func PKCS5UnPadding(plainText []byte) ([]byte, error)
- func RsaDecrypt(cryptText, key []byte) ([]byte, error)
- func RsaEncrypt(plainText, key []byte) (cryptText []byte, err error)
- func RsaSign(msg, Key []byte) (cryptText []byte, err error)
- func RsaVerifySign(msg []byte, sign []byte, Key []byte) bool
- func Sha1(b []byte) []byte
- func Sha1Hex(b []byte) string
- func Sha256(data []byte) []byte
- func Sha256Hex(data []byte) string
- func Sha512(data []byte) []byte
- func Sha512Hex(data []byte) string
- func TripleDesDecrypt(cipherText, key, ivDes []byte) ([]byte, error)
- func TripleDesEncrypt(plainText, key, ivDes []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesCbcEncrypt ¶
encrypt the key length must be 16,24,32
func AesCtrDecrypt ¶
func AesCtrEncrypt ¶
func DesCbcDecrypt ¶
func DesCbcEncrypt ¶
func HmacSha512 ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func RsaDecrypt ¶
func RsaEncrypt ¶
func TripleDesDecrypt ¶
func TripleDesEncrypt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.