人民医院前端

rsa.d.ts 987B

123456789101112131415161718192021222324
  1. import { BigInteger } from "./jsbn";
  2. export declare class RSAKey {
  3. constructor();
  4. doPublic(x: BigInteger): BigInteger;
  5. doPrivate(x: BigInteger): BigInteger;
  6. setPublic(N: string, E: string): void;
  7. encrypt(text: string): string;
  8. setPrivate(N: string, E: string, D: string): void;
  9. setPrivateEx(N: string, E: string, D: string, P: string, Q: string, DP: string, DQ: string, C: string): void;
  10. generate(B: number, E: string): void;
  11. decrypt(ctext: string): string;
  12. generateAsync(B: number, E: string, callback: () => void): void;
  13. sign(text: string, digestMethod: (str: string) => string, digestName: string): string;
  14. verify(text: string, signature: string, digestMethod: (str: string) => string): boolean;
  15. protected n: BigInteger;
  16. protected e: number;
  17. protected d: BigInteger;
  18. protected p: BigInteger;
  19. protected q: BigInteger;
  20. protected dmp1: BigInteger;
  21. protected dmq1: BigInteger;
  22. protected coeff: BigInteger;
  23. }