Documentation ¶
Index ¶
- func AesDecryptCBC(key, src []byte) (data []byte, err error)
- func AesDecryptCFB(key, encrypted []byte) (decrypted []byte)
- func AesDecryptECB(key, encrypted []byte) (decrypted []byte)
- func AesEncryptCBC(key, src []byte) (data []byte, err error)
- func AesEncryptCFB(key, origData []byte) (encrypted []byte)
- func AesEncryptECB(key, origData []byte) (encrypted []byte)
- func CreateKeyX509PKCS1(bits int) (pub string, pri string)
- func DecryptDataByAes(key, data string) ([]byte, error)
- func EncryptDataByAes(key string, data []byte) (string, error)
- func Md5(str string) string
- func Md5SaltMulti(str string, salt string, iteration int) string
- func Md5To16(str string) string
- func Md5WithSalt(str string, salt string) string
- func PrivateKeyFromX509PKCS1(pri string) (*rsa.PrivateKey, error)
- func PublicKeyFromX509PKCS1(pub string) (*rsa.PublicKey, error)
- func RsaDecrypt(key *rsa.PrivateKey, src []byte) (data []byte, err error)
- func RsaEncrypt(key *rsa.PublicKey, src []byte) (data []byte, err error)
- func Sign(key *rsa.PrivateKey, src []byte) (sign []byte, err error)
- func Verify(key *rsa.PublicKey, sign, src []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecryptCBC ¶
AesDecryptCBC aes解密
func AesDecryptCFB ¶
AesDecryptCFB aes解密
func AesDecryptECB ¶
AesDecryptECB aes解密
func AesEncryptCBC ¶
AesEncryptCBC aes加密
func AesEncryptCFB ¶
AesEncryptCFB aes加密
func AesEncryptECB ¶
AesEncryptECB aes加密
func CreateKeyX509PKCS1 ¶
func DecryptDataByAes ¶
DecryptDataByAes base64解码后 Aes 解密
func EncryptDataByAes ¶
EncryptDataByAes Aes加密后base64
func Md5SaltMulti ¶
Md5SaltMulti 加盐并多次加密
func PrivateKeyFromX509PKCS1 ¶
func PrivateKeyFromX509PKCS1(pri string) (*rsa.PrivateKey, error)
func RsaDecrypt ¶
func RsaDecrypt(key *rsa.PrivateKey, src []byte) (data []byte, err error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.