mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-11 00:02:28 +08:00
refactor: add error value return for GenerateRsaKey func
This commit is contained in:
@@ -147,7 +147,7 @@ func Md5File(filename string) (string, error) //return the md5 value of file
|
||||
func Sha1(data string) string //get sha1 value
|
||||
func Sha256(data string) string //getsha256 value
|
||||
func Sha512(data string) string //get sha512 value
|
||||
func GenerateRsaKey(keySize int, priKeyFile, pubKeyFile string) //generate RSA pem file
|
||||
func GenerateRsaKey(keySize int, priKeyFile, pubKeyFile string) error //generate RSA pem file
|
||||
func RsaEncrypt(data []byte, pubKeyFileName string) []byte //RSA encrypt
|
||||
func RsaDecrypt(data []byte, privateKeyFileName string) []byte //RSA decrypt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user