Documentation ¶
Index ¶
- func Decrypt(privateKey string, cipherText string, passphrase string) string
- func Encrypt(publicKey string, plainText string, passphrase string) string
- func PemToPrivateKey(privKey []byte, passphrase string) *rsa.PrivateKey
- func PemToPublicKey(pubKey []byte, passphrase string) *rsa.PublicKey
- func PrivateKeyToBytes(privKey *rsa.PrivateKey, passphrase string) []byte
- func PublicKeyToBytes(pub *rsa.PublicKey, passphrase string) []byte
- type KeyPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PemToPrivateKey ¶
func PemToPrivateKey(privKey []byte, passphrase string) *rsa.PrivateKey
PemToPrivateKey converts pem string to a private key.
func PemToPublicKey ¶
PemToPublicKey converts pem string to a public key.
func PrivateKeyToBytes ¶
func PrivateKeyToBytes(privKey *rsa.PrivateKey, passphrase string) []byte
PrivateKeyToBytes converts a private key to bytes.
Types ¶
Click to show internal directories.
Click to hide internal directories.