Documentation
¶
Index ¶
- func Decrypt(src []byte, privateKey *rsa.PrivateKey) ([]byte, error)
- func DecryptByPem(src []byte, file string) ([]byte, error)
- func Encrypt(src []byte, publickey *rsa.PublicKey) ([]byte, error)
- func GenKeys(bits int) (privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey, err error)
- func GenPemFiles(dir string, bits int) error
- func GenPems(privateKeyWriter, publicKeyWriter io.Writer, bits int) error
- func JSEncrypt(msg string, privateData []byte) string
- func JSEncryptByPem(msg string, privatePemPath string) string
- func PrivateKeyFromBytes(priByte []byte) (*rsa.PrivateKey, error)
- func PrivateKeyFromFile(file string) (*rsa.PrivateKey, error)
- func PublicKeyFromBytes(pubByte []byte) (*rsa.PublicKey, error)
- func PublicKeyFromFile(file string) (*rsa.PublicKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptByPem ¶
DecryptByPem 通过Pem文件解码
func JSEncryptByPem ¶
RSA_JSEncrypt 用于用户名、密码解密
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.