Versions in this module Expand all Collapse all v0 v0.0.3 Apr 14, 2024 Changes in this version + func BytesToPrivateKey(priv []byte, password []byte) (*rsa.PrivateKey, error) + func BytesToPublicKey(pub []byte) (*rsa.PublicKey, error) + func DecryptAES(ciphertext []byte, aesKey []byte, initialVector []byte) ([]byte, error) + func DecryptGCM(cipherBytes []byte, aesKey []byte, initialVector []byte) ([]byte, error) + func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error) + func EncryptAES(plaintext []byte, aesKey []byte, initialVector []byte) ([]byte, error) + func EncryptGCM(plainBytes []byte, aesKey []byte, initialVector []byte) ([]byte, error) + func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error) + func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error) + func PadAESBlockSize(src []byte) []byte + func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte + func PublicKeyToBytes(pub *rsa.PublicKey) ([]byte, error) + func UnpadAESBlockSize(src []byte) ([]byte, error)