import { Buffer } from '@craftzdog/react-native-buffer'; import { KeyObject, CryptoKey } from './classes'; import type { BinaryLike } from '../utils'; type KeyInput = BinaryLike | KeyObject | CryptoKey | KeyInputObject; interface KeyInputObject { key: BinaryLike | KeyObject | CryptoKey; format?: 'pem' | 'der'; type?: 'pkcs1' | 'pkcs8' | 'spki' | 'sec1'; passphrase?: BinaryLike; padding?: number; saltLength?: number; dsaEncoding?: 'der' | 'ieee-p1363'; } export declare class Sign { private handle; constructor(algorithm: string); update(data: BinaryLike): this; sign(privateKey: KeyInput, outputEncoding?: BufferEncoding): Buffer; } export declare class Verify { private handle; constructor(algorithm: string); update(data: BinaryLike): this; verify(publicKey: KeyInput, signature: BinaryLike, signatureEncoding?: BufferEncoding): boolean; } export declare function createSign(algorithm: string): Sign; export declare function createVerify(algorithm: string): Verify; type SignCallback = (err: Error | null, signature?: Buffer) => void; type VerifyCallback = (err: Error | null, result?: boolean) => void; export declare function sign(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput): Buffer; export declare function sign(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput, callback: SignCallback): void; export declare function verify(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput, signature: BinaryLike): boolean; export declare function verify(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput, signature: BinaryLike, callback: VerifyCallback): void; export {}; //# sourceMappingURL=signVerify.d.ts.map