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 RegHashMode(mode string, creator func() (crypto.Hash, hash.Hash))
- 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
func RegHashMode ¶ added in v0.1.16
Types ¶
Click to show internal directories.
Click to hide internal directories.