Documentation ¶
Index ¶
- func Decrypt(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
- func Encrypt(msg []byte, pub *rsa.PublicKey) ([]byte, error)
- func GenKeypair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)
- func ImportPrivPem(filename string) (*rsa.PrivateKey, error)
- func ImportPubPem(filename string) (*rsa.PublicKey, error)
- func PemToPrivkey(privkeystr string) (*rsa.PrivateKey, error)
- func PemToPubkey(pubkeystr string) (*rsa.PublicKey, error)
- func WritePrivPem(key *rsa.PrivateKey, filename string) error
- func WritePubPem(key *rsa.PublicKey, filename string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)
Decrypt decrypts data with private key
func GenKeypair ¶
func ImportPrivPem ¶
func ImportPrivPem(filename string) (*rsa.PrivateKey, error)
func PemToPrivkey ¶
func PemToPrivkey(privkeystr string) (*rsa.PrivateKey, error)
func WritePrivPem ¶
func WritePrivPem(key *rsa.PrivateKey, filename string) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.