@libp2p/crypto
Version:
Crypto primitives for libp2p
11 lines • 657 B
TypeScript
import randomBytes from '../../random-bytes.js';
import * as utils from './utils.js';
import type { JWKKeyPair } from '../interface.js';
import type { Uint8ArrayList } from 'uint8arraylist';
export { utils };
export declare function generateRSAKey(bits: number): Promise<JWKKeyPair>;
export { randomBytes as getRandomValues };
export declare function hashAndSign(key: JsonWebKey, msg: Uint8Array | Uint8ArrayList): Promise<Uint8Array>;
export declare function hashAndVerify(key: JsonWebKey, sig: Uint8Array, msg: Uint8Array | Uint8ArrayList): Promise<boolean>;
export declare function rsaKeySize(jwk: JsonWebKey): number;
//# sourceMappingURL=index.d.ts.map