Documentation ¶
Index ¶
- func DecryptOAEP(hash hash.Hash, random io.Reader, private *rsa.PrivateKey, msg []byte, ...) ([]byte, error)
- func EncryptOAEP(hash hash.Hash, random io.Reader, public *rsa.PublicKey, msg []byte, ...) ([]byte, error)
- func ExportPEMStrToPrivKey(priv []byte) *rsa.PrivateKey
- func ExportPEMStrToPubKey(pub []byte) *rsa.PublicKey
- func ExportPrivKeyAsPEMStr(privkey *rsa.PrivateKey) string
- func ExportPubkeyAsPEMStr(pubkey *rsa.PublicKey) string
- func GenerateRsaKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey)
- func RsaDec(pri *rsa.PrivateKey, dat []byte) []byte
- func RsaEnc(pub *rsa.PublicKey, dat []byte) []byte
- func RsaSign(pri *rsa.PrivateKey, dat []byte) []byte
- func RsaVerify(pub *rsa.PublicKey, sig []byte, dat []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptOAEP ¶
func EncryptOAEP ¶
func ExportPEMStrToPrivKey ¶
func ExportPEMStrToPrivKey(priv []byte) *rsa.PrivateKey
func ExportPEMStrToPubKey ¶
func ExportPrivKeyAsPEMStr ¶
func ExportPrivKeyAsPEMStr(privkey *rsa.PrivateKey) string
func ExportPubkeyAsPEMStr ¶
func GenerateRsaKeyPair ¶
func GenerateRsaKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.