/**
 * Node.js crypto module shim
 * Provides cryptographic utilities using Web Crypto API
 */
import { Buffer } from './stream';
import { EventEmitter } from './events';
export declare function randomBytes(size: number): Buffer;
export declare function randomUUID(): string;
export declare function randomInt(min: number, max?: number): number;
export declare function getRandomValues<T extends ArrayBufferView>(array: T): T;
export declare function createHash(algorithm: string): Hash;
declare class Hash {
    private algorithm;
    private data;
    constructor(algorithm: string);
    update(data: string | Buffer, encoding?: string): this;
    digestAsync(encoding?: string): Promise<string | Buffer>;
    digest(encoding?: string): string | Buffer;
}
export declare function createHmac(algorithm: string, key: string | Buffer): Hmac;
declare class Hmac {
    private algorithm;
    private key;
    private data;
    constructor(algorithm: string, key: string | Buffer);
    update(data: string | Buffer, encoding?: string): this;
    digestAsync(encoding?: string): Promise<string | Buffer>;
    digest(encoding?: string): string | Buffer;
}
type BinaryLike = string | Buffer | Uint8Array;
/**
 * PBKDF2 with callback (Node.js compatible API)
 */
export declare function pbkdf2(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey: Buffer) => void): void;
/**
 * Synchronous PBKDF2 - Note: Uses a pure JS implementation since WebCrypto is async-only
 * For better performance, use the async pbkdf2() function instead
 */
export declare function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
/**
 * Calculates and returns a signature for data using the given private key
 * This is the one-shot API that jose uses
 */
export declare function sign(algorithm: string | null | undefined, data: Buffer | Uint8Array, key: KeyLike, callback?: (error: Error | null, signature: Buffer) => void): Buffer | void;
/**
 * Verifies the given signature for data using the given key
 */
export declare function verify(algorithm: string | null | undefined, data: Buffer | Uint8Array, key: KeyLike, signature: Buffer | Uint8Array, callback?: (error: Error | null, result: boolean) => void): boolean | void;
export declare function createSign(algorithm: string): Sign;
export declare function createVerify(algorithm: string): Verify;
declare class Sign extends EventEmitter {
    private algorithm;
    private data;
    constructor(algorithm: string);
    update(data: string | Buffer, encoding?: string): this;
    sign(privateKey: KeyLike, outputEncoding?: string): Buffer | string;
}
declare class Verify extends EventEmitter {
    private algorithm;
    private data;
    constructor(algorithm: string);
    update(data: string | Buffer, encoding?: string): this;
    verify(publicKey: KeyLike, signature: Buffer | string, signatureEncoding?: string): boolean;
}
export declare class KeyObject {
    private _keyData;
    private _type;
    private _algorithm?;
    constructor(type: 'public' | 'private' | 'secret', keyData: CryptoKey | Uint8Array, algorithm?: string);
    get type(): string;
    get asymmetricKeyType(): string | undefined;
    get symmetricKeySize(): number | undefined;
    export(options?: {
        type?: string;
        format?: string;
    }): Buffer | string;
}
export declare function createSecretKey(key: Buffer | string, encoding?: string): KeyObject;
export declare function createPublicKey(key: KeyLike): KeyObject;
export declare function createPrivateKey(key: KeyLike): KeyObject;
export declare function timingSafeEqual(a: Buffer, b: Buffer): boolean;
export declare function getCiphers(): string[];
export declare function getHashes(): string[];
export declare const constants: {
    SSL_OP_ALL: number;
    RSA_PKCS1_PADDING: number;
    RSA_PKCS1_OAEP_PADDING: number;
    RSA_PKCS1_PSS_PADDING: number;
};
type KeyLike = string | Buffer | KeyObject | {
    key: string | Buffer;
    passphrase?: string;
};
declare const _default: {
    randomBytes: typeof randomBytes;
    randomUUID: typeof randomUUID;
    randomInt: typeof randomInt;
    getRandomValues: typeof getRandomValues;
    createHash: typeof createHash;
    createHmac: typeof createHmac;
    createSign: typeof createSign;
    createVerify: typeof createVerify;
    sign: typeof sign;
    verify: typeof verify;
    pbkdf2: typeof pbkdf2;
    pbkdf2Sync: typeof pbkdf2Sync;
    timingSafeEqual: typeof timingSafeEqual;
    getCiphers: typeof getCiphers;
    getHashes: typeof getHashes;
    constants: {
        SSL_OP_ALL: number;
        RSA_PKCS1_PADDING: number;
        RSA_PKCS1_OAEP_PADDING: number;
        RSA_PKCS1_PSS_PADDING: number;
    };
    KeyObject: typeof KeyObject;
    createSecretKey: typeof createSecretKey;
    createPublicKey: typeof createPublicKey;
    createPrivateKey: typeof createPrivateKey;
};
export default _default;
//# sourceMappingURL=crypto.d.ts.map