Documentation
¶
Index ¶
- func DecryptBytWithPrivateKey(privateKey []byte, encryptData []byte) ([]byte, error)
- func DecryptWithPrivateKey(privateKey []byte, encryptData string) ([]byte, error)
- func EncryptBytWithPublicKey(publicKey []byte, bs []byte) ([]byte, error)
- func EncryptWithPublicKey(publicKey []byte, bs string) (string, error)
- func GenRsaPriPubKey(bits int) ([]byte, []byte, error)
- func GenRsaPrivateKey(bits int) (*rsa.PrivateKey, []byte, error)
- func GenRsaPublicKey(privateKey []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptWithPrivateKey ¶
DecryptWithPrivateKey 私钥解密
func EncryptBytWithPublicKey ¶
EncryptBytWithPublicKey 公钥加密,传入byte 可加密任意长度数据
func EncryptWithPublicKey ¶
EncryptWithPublicKey 公钥加密
func GenRsaPriPubKey ¶
GenRsaPriPubKey 生成公钥私钥
func GenRsaPrivateKey ¶
func GenRsaPrivateKey(bits int) (*rsa.PrivateKey, []byte, error)
GenRsaPrivateKey 生成私钥
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.