Documentation ¶
Index ¶
- func AESCBCDecrypt(key, iv, cipherText []byte) ([]byte, error)
- func AESCBCEncrypt(key, iv, plainText []byte) ([]byte, error)
- func AESECBDecrypt(key, cipherText []byte) ([]byte, error)
- func AESECBEncrypt(key, plainText []byte) ([]byte, error)
- func DecryptPriKey(prikey, passphrase []byte) (*rsa.PrivateKey, error)
- func OAEPDecrypt(pub *rsa.PublicKey, pri *rsa.PrivateKey, cipherText []byte) ([]byte, error)
- func ParseASk(ask string) ([]byte, error)
- func ParsePublicCertification(pubCert []byte) (*rsa.PublicKey, error)
- func RSADecryptByKey(privateKey *rsa.PrivateKey, ciphertext []byte) ([]byte, error)
- func RSAEncryptByCert(pemCertificate *rsa.PublicKey, origData []byte) ([]byte, error)
- func RSAEncryptByKey(publicKey *rsa.PublicKey, origData []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AESCBCDecrypt ¶
AESCBCDecrypt is given key, iv to decrypt the cipherText in AES CBC way.
func AESCBCEncrypt ¶
AESCBCEncrypt is given key, iv to encrypt the plainText in AES CBC way.
func AESECBDecrypt ¶
AESECBDecrypt is given key to decrypt the cipherText in AES ECB way.
func AESECBEncrypt ¶
AESECBEncrypt is given key to encrypt the plainText in AES ECB way.
func DecryptPriKey ¶
func DecryptPriKey(prikey, passphrase []byte) (*rsa.PrivateKey, error)
func OAEPDecrypt ¶
func RSADecryptByKey ¶
func RSADecryptByKey(privateKey *rsa.PrivateKey, ciphertext []byte) ([]byte, error)
func RSAEncryptByCert ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.