Documentation ¶
Overview ¶
Package rsa provides rsa encryption/decryption utilities
Index ¶
- func Decrypt(ciphertext []byte, privateKey ...[]byte) ([]byte, error)
- func DecryptBase64(input []byte, privateKey ...[]byte) ([]byte, error)
- func DecryptLongString(cipherText string, publicKey, privateKey []byte) (result string, err error)
- func Encrypt(input []byte, publicKey ...[]byte) ([]byte, error)
- func EncryptBase64(input []byte, publicKey ...[]byte) ([]byte, error)
- func EncryptLongString(raw string, publicKey []byte) (result string, err error)
- func GenKeys(publicKeyWriter, privateKeyWriter io.Writer, keyLength int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
Decrypt from rsa string
func DecryptBase64 ¶
DecryptBase64 decrypt from base64 string
func DecryptLongString ¶ added in v1.4.0
DecryptLongString decrypt long string from base64 string
func Encrypt ¶
Encrypt to rsa string
func EncryptBase64 ¶
EncryptBase64 encrypt to base64 string
func EncryptLongString ¶ added in v1.4.0
EncryptLongString encrypt long string to base64 string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.