Documentation ¶
Index ¶
- Variables
- func AESCBCDecrypt(cipherText, key, iv []byte) []byte
- func AESCBCEncrypt(plainText, key, iv []byte) []byte
- func AESECBDecrypt(cipherText, key []byte) []byte
- func AESECBEncrypt(plainText, key []byte) []byte
- func AesEncryptCBCWithIv(origData []byte, key []byte, iv []byte) (encrypted []byte)
- func BytesToPublicKey(pub []byte) (*rsa.PublicKey, error)
- func DESEncrypt(src []byte) []byte
- func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func ParsePublicKey(publicKey []byte) (*rsa.PublicKey, error)
- func RSAEncrypt(origData []byte, modulus string, exponent int64) string
- func RSAEncryptV2(origData []byte, publicKey *rsa.PublicKey) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SECRET_KEY = []byte("ylzsxkwm") DesModeEncrypt = 0 DesModeDecrypt = 1 )
Functions ¶
func AESCBCDecrypt ¶
func AESCBCEncrypt ¶
func AESECBDecrypt ¶
func AESECBEncrypt ¶
func AesEncryptCBCWithIv ¶
func BytesToPublicKey ¶
BytesToPublicKey bytes to public key
func DESEncrypt ¶
func EncryptWithPublicKey ¶
EncryptWithPublicKey encrypts data with public key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.