Documentation ¶
Index ¶
- func AesDecryptCBC(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)
- func AesEncryptCBC(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptECB(origData []byte, key []byte) (encrypted []byte)
- func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)
- func BytesToPublicKey(pub []byte) (*rsa.PublicKey, error)
- func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
- func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecryptCBC ¶
func AesDecryptECB ¶
func AesEncryptCBC ¶
=================== CBC ======================
func AesEncryptECB ¶
=================== ECB ======================
func BytesToPrivateKey ¶
func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)
BytesToPrivateKey bytes to private key
func BytesToPublicKey ¶
BytesToPublicKey bytes to public key
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
DecryptWithPrivateKey decrypts data with private key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.