Documentation ¶
Index ¶
- func Decrypt(cipher []byte, privateKey *rsa.PrivateKey) ([]byte, error)
- func DefaultDecrypt(cipher []byte) ([]byte, error)
- func DefaultEncrypt(plaintext []byte) ([]byte, error)
- func Encrypt(plaintext []byte, publicKey *rsa.PublicKey) ([]byte, error)
- func GenRsaKey(path string, bitNum int)
- func ReadPrivateKey(path string) (*rsa.PrivateKey, error)
- func ReadPublicKey(path string) (*rsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(cipher []byte, privateKey *rsa.PrivateKey) ([]byte, error)
Decrypt RSA私钥解密
func DefaultDecrypt ¶
func DefaultEncrypt ¶
func ReadPrivateKey ¶
func ReadPrivateKey(path string) (*rsa.PrivateKey, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.