1
This commit is contained in:
19
utils/aeshelper/apikey.go
Normal file
19
utils/aeshelper/apikey.go
Normal file
@ -0,0 +1,19 @@
|
||||
package aeshelper
|
||||
|
||||
var (
|
||||
apiaeskey = "9jxFTkydwCJsmIA1TUrv"
|
||||
)
|
||||
|
||||
// EncryptApi 加密apikey
|
||||
func EncryptApi(apikey, secretkey string) (apikeyen, secrekeyen string) {
|
||||
apikeyen = Encrypt(apikey, apiaeskey)
|
||||
secrekeyen = Encrypt(secretkey, apiaeskey)
|
||||
return apikeyen, secrekeyen
|
||||
}
|
||||
|
||||
// DecryptApi 解密apikey
|
||||
func DecryptApi(apikeyen, secrekeyen string) (apikey, secrekey string) {
|
||||
apikey = Decrypt(apikeyen, apiaeskey)
|
||||
secrekey = Decrypt(secrekeyen, apiaeskey)
|
||||
return apikey, secrekey
|
||||
}
|
||||
Reference in New Issue
Block a user