crypto.d.ts 457 B

123456
  1. import crypto, { BinaryLike } from 'crypto';
  2. export type { KeyObject } from 'crypto';
  3. export declare function createPublicKey(key: string | Buffer, type?: 'spki' | 'pkcs1'): crypto.KeyObject;
  4. export declare function digest(algorithm: string, ...data: BinaryLike[]): Buffer;
  5. export declare function verify(data: Buffer, key: crypto.KeyLike, signature: Buffer, algorithm?: string): boolean;
  6. export declare function bufferEqual(a: Buffer, b: Buffer): boolean;