interface.uts 643 B

1234567891011121314151617181920212223
  1. /* 同步函数定义 */
  2. export type CommonSync = (str : string) => string
  3. export type sm4Sync = (str : string, key : string) => string
  4. export type ivSync = (str : string, key : string, iv: string) => string
  5. export type sm2Validate = (str : string, pub : string, sign: string) => boolean
  6. // #ifdef APP-ANDROID
  7. import KeyPair from 'java.security.KeyPair';
  8. export enum KeyType {
  9. PUB = 1,
  10. PRI = 2
  11. }
  12. export type rsaSync = (str : string, key : KeyPair, type : KeyType) => string
  13. export type rsaCommonSync = (str : string, key : KeyPair) => string
  14. export type rsaValidate = (str : string, str2 : string, key : KeyPair) => boolean
  15. // #endif