main.tea 351 B

123456789101112131415
  1. import EasySDKKernel;
  2. type @kernel = EasySDKKernel
  3. init(kernel: EasySDKKernel) {
  4. @kernel = kernel;
  5. }
  6. function decrypt(cipherText: string): string {
  7. return @kernel.aesDecrypt(cipherText, @kernel.getConfig('encryptKey'));
  8. }
  9. function encrypt(plainText: string): string {
  10. return @kernel.aesEncrypt(plainText, @kernel.getConfig('encryptKey'));
  11. }