/**
 * @license
 *
 * Portions copyright 2022-2023 Project CHIP Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { Bytes } from "#util/Bytes.js";
import { MaybePromise } from "#util/Promises.js";
import { Crypto, HashAlgorithm } from "./Crypto.js";
import { EcdsaSignature } from "./EcdsaSignature.js";
import { PrivateKey, PublicKey } from "./Key.js";
import { WebCrypto } from "./WebCrypto.js";
/**
 * A {@link Crypto} implementation that uses only JS standards.
 *
 * WARNING: This code is unaudited.  Use a trusted native alternative where available.
 *
 * This module is mostly based on  {@link crypto.subtle}.  This should be a reliable native implementation.  However,
 * Web Crypto doesn't support AES-CCM required by Matter so we use a JS implementation for that.  See relevant warnings
 * in the "aes" subdirectory.
 */
export declare class StandardCrypto extends Crypto {
    #private;
    implementationName: string;
    constructor(crypto?: WebCrypto);
    protected get subtle(): SubtleCrypto;
    static provider(): StandardCrypto;
    randomBytes(length: number): Bytes;
    encrypt(key: Bytes, data: Bytes, nonce: Bytes, associatedData?: Bytes): AllowSharedBufferSource;
    decrypt(key: Bytes, data: Bytes, nonce: Bytes, associatedData?: Bytes): AllowSharedBufferSource;
    computeHash(buffer: Bytes | Bytes[] | ReadableStreamDefaultReader<Bytes> | AsyncIterator<Bytes>, algorithm?: HashAlgorithm): Promise<ArrayBuffer>;
    createPbkdf2Key(secret: Bytes, salt: Bytes, iteration: number, keyLength: number): Promise<ArrayBuffer>;
    createHkdfKey(secret: Bytes, salt: Bytes, info: Bytes, length?: number): Promise<Bytes>;
    signHmac(secret: Bytes, data: Bytes): MaybePromise<Bytes>;
    signEcdsa(key: JsonWebKey, data: Bytes | Bytes[]): Promise<EcdsaSignature>;
    verifyEcdsa(key: JsonWebKey, data: Bytes, signature: EcdsaSignature): Promise<void>;
    createKeyPair(): Promise<PrivateKey>;
    protected generateJwk(): Promise<JsonWebKey>;
    generateDhSecret(key: PrivateKey, peerKey: PublicKey): Promise<Bytes>;
    protected importKey(format: KeyFormat, keyData: JsonWebKey | Bytes, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
}
//# sourceMappingURL=StandardCrypto.d.ts.map