Documentation
¶
Index ¶
- func Base64Decode(message []byte) ([]byte, error)
- func Base64Encode(message []byte) []byte
- func DecryptWithPrivateKey(ciphertext string, privateKey *rsa.PrivateKey) string
- func EncryptWithPublicKey(message string, publicKey *rsa.PublicKey) string
- func RsaDecrypt(toDecrypt string, privateKeyPath string) *string
- func RsaEncrypt(toEncrypt string, privateKeyPath string) *string
- func RsaGenerate() (*rsa.PrivateKey, *rsa.PublicKey)
- func RsaPrivateFromString(privateKeyPem string) *rsa.PrivateKey
- func RsaPrivateToString(privateKey *rsa.PrivateKey) string
- func RsaPublicFromString(publicKey string) *rsa.PublicKey
- func RsaPublicToString(publicKey *rsa.PublicKey) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64Decode ¶
func Base64Encode ¶
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(ciphertext string, privateKey *rsa.PrivateKey) string
DecryptWithPrivateKey decrypts data with private key
func EncryptWithPublicKey ¶
EncryptWithPublicKey encrypts data with public key
func RsaDecrypt ¶
func RsaEncrypt ¶
func RsaGenerate ¶
func RsaGenerate() (*rsa.PrivateKey, *rsa.PublicKey)
func RsaPrivateFromString ¶
func RsaPrivateFromString(privateKeyPem string) *rsa.PrivateKey
func RsaPrivateToString ¶
func RsaPrivateToString(privateKey *rsa.PrivateKey) string
func RsaPublicFromString ¶
func RsaPublicToString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.