react-native-quick-crypto
Version:
A fast implementation of Node's `crypto` module written in C/C++ JSI
33 lines (31 loc) • 830 B
text/typescript
import { type HybridObject } from 'react-native-nitro-modules';
import type {
AsymmetricKeyType,
JWK,
KeyDetail,
KeyEncoding,
KeyType,
KFormatType,
NamedCurve,
} from '../utils';
export interface KeyObjectHandle
extends HybridObject<{ ios: 'c++'; android: 'c++' }> {
exportKey(
format?: KFormatType,
type?: KeyEncoding,
cipher?: string,
passphrase?: ArrayBuffer,
): ArrayBuffer;
exportJwk(key: JWK, handleRsaPss: boolean): JWK;
getAsymmetricKeyType(): AsymmetricKeyType;
init(
keyType: KeyType,
key: string | ArrayBuffer,
format?: KFormatType,
type?: KeyEncoding,
passphrase?: ArrayBuffer,
): boolean;
initECRaw(namedCurve: string, keyData: ArrayBuffer): boolean;
initJwk(keyData: JWK, namedCurve?: NamedCurve): KeyType | undefined;
keyDetail(): KeyDetail;
}