Documentation
¶
Index ¶
- func Decrypt(ciphertext, privateKey string) (data string, err error)
- func Encrypt(plainText, publicKey string) (data string, err error)
- func GenerateKey(bits int) (prikey string, pubkey string, err error)
- func Sign(data, privateKey, mode string) (string, error)
- func Verify(data, sign, publicKey, mode string) (pass bool, err error)
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
GenerateKey 生成基于pkcs1的rsa私、公钥对 bits 密钥位数:1024,2048
Types ¶
Click to show internal directories.
Click to hide internal directories.