canyin-project/ybcy/vendor/alipaysdk/easysdk/tea/util/aes/main.tea

16 lines
351 B
Java
Raw Normal View History

2024-11-01 16:07:54 +08:00
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'));
}