UNPKG

react-native-quick-crypto

Version:

A fast implementation of Node's `crypto` module written in C/C++ JSI

19 lines 1.22 kB
import { PrivateKeyObject, PublicKeyObject } from './keys'; import type { CryptoKeyPair, KeyUsage, SubtleAlgorithm, GenerateKeyPairOptions, KeyPairGenConfig } from './utils'; import type { RsaKeyPair } from './specs/rsaKeyPair.nitro'; export declare class Rsa { native: RsaKeyPair; constructor(modulusLength: number, publicExponent: Uint8Array, hashAlgorithm: string); generateKeyPair(): Promise<CryptoKeyPair>; generateKeyPairSync(): CryptoKeyPair; } export declare function rsa_generateKeyPair(algorithm: SubtleAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; export declare function rsa_generateKeyPairNode(type: 'rsa' | 'rsa-pss', options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): Promise<{ publicKey: PublicKeyObject | Buffer | string | ArrayBuffer; privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer; }>; export declare function rsa_generateKeyPairNodeSync(type: 'rsa' | 'rsa-pss', options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): { publicKey: PublicKeyObject | Buffer | string | ArrayBuffer; privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer; }; //# sourceMappingURL=rsa.d.ts.map