react-native-quick-crypto
Version:
A fast implementation of Node's `crypto` module written in C/C++ JSI
34 lines • 1.52 kB
TypeScript
import { KeyEncoding, KFormatType } from '../utils';
import type { CryptoKeyPair, EncodingOptions } from '../utils';
import type { CryptoKey } from './classes';
export declare const isCryptoKey: (obj: any) => boolean;
export declare function getCryptoKeyPair(key: CryptoKey | CryptoKeyPair): CryptoKeyPair;
/**
* Parses the public key encoding based on an object. keyType must be undefined
* when this is used to parse an input encoding and must be a valid key type if
* used to parse an output encoding.
*/
export declare function parsePublicKeyEncoding(enc: EncodingOptions, keyType: string | undefined, objName?: string): {
format: KFormatType;
type: KeyEncoding | undefined;
cipher: string | undefined;
passphrase: ArrayBuffer | undefined;
};
/**
* Parses the private key encoding based on an object. keyType must be undefined
* when this is used to parse an input encoding and must be a valid key type if
* used to parse an output encoding.
*/
export declare function parsePrivateKeyEncoding(enc: EncodingOptions, keyType: string | undefined, objName?: string): {
format: KFormatType;
type: KeyEncoding | undefined;
cipher: string | undefined;
passphrase: ArrayBuffer | undefined;
};
export declare function parseKeyEncoding(enc: EncodingOptions, keyType?: string, isPublic?: boolean, objName?: string): {
format: KFormatType;
type: KeyEncoding | undefined;
cipher: string | undefined;
passphrase: ArrayBuffer | undefined;
};
//# sourceMappingURL=utils.d.ts.map