rsa
#
使用
#
函数列表
#
CreateKeyX509PKCS1(bits int) (pub string, pri string)
创建公钥私钥Decrypt(key *rsa.PrivateKey, src []byte) (data []byte, err error)
解密数据Encrypt(key *rsa.PublicKey, src []byte) (data []byte, err error)
加密数据PrivateKeyFromX509PKCS1(pri string) (*rsa.PrivateKey, error)
从X509PKCS1解析私钥PublicKeyFromX509PKCS1(pub string) (*rsa.PublicKey, error)
从X509PKCS1解析公钥Sign(key *rsa.PrivateKey, src []byte) (sign []byte, err error)
使用私钥签名Verify(key *rsa.PublicKey, sign, src []byte) (err error)
使用公钥校验PrivateKeyToPKCS1(pri *rsa.PrivateKey) string
私钥转成字符串PublicKeyToPKCS1(pub *rsa.PublicKey) string
公钥转成字符串