添加网站文件
This commit is contained in:
26
vendor/alipaysdk/easysdk/tea/util/aes/Teafile
vendored
Normal file
26
vendor/alipaysdk/easysdk/tea/util/aes/Teafile
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"scope": "alipay",
|
||||
"name": "easysdk-util-aes",
|
||||
"version": "0.0.1",
|
||||
"main": "./main.tea",
|
||||
"java": {
|
||||
"package": "com.alipay.easysdk.util.aes",
|
||||
"baseClient": "com.alipay.easysdk.kernel.BaseClient"
|
||||
},
|
||||
"csharp": {
|
||||
"namespace": "Alipay.EasySDK.Util.AES",
|
||||
"baseClient": "Alipay.EasySDK.Kernel:BaseClient"
|
||||
},
|
||||
"typescript": {
|
||||
"baseClient": "@alipay/easysdk-baseclient"
|
||||
},
|
||||
"php": {
|
||||
"package": "Alipay.EasySDK.Util.AES"
|
||||
},
|
||||
"go": {
|
||||
"baseClient": "util/aes"
|
||||
},
|
||||
"libraries": {
|
||||
"EasySDKKernel": "alipay:easysdk-kernel:*"
|
||||
}
|
||||
}
|
||||
15
vendor/alipaysdk/easysdk/tea/util/aes/main.tea
vendored
Normal file
15
vendor/alipaysdk/easysdk/tea/util/aes/main.tea
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import EasySDKKernel;
|
||||
|
||||
type @kernel = EasySDKKernel
|
||||
|
||||
init(kernel: EasySDKKernel) {
|
||||
@kernel = kernel;
|
||||
}
|
||||
|
||||
function decrypt(cipherText: string): string {
|
||||
return @kernel.aesDecrypt(cipherText, @kernel.getConfig('encryptKey'));
|
||||
}
|
||||
|
||||
function encrypt(plainText: string): string {
|
||||
return @kernel.aesEncrypt(plainText, @kernel.getConfig('encryptKey'));
|
||||
}
|
||||
Reference in New Issue
Block a user