Encrypted Pouch - v0.1.0
    Preparing search index...

    Interface CryptoInterface

    WebCrypto API interface for encryption operations. Compatible with both browser (window.crypto) and Node.js (global.crypto).

    interface CryptoInterface {
        subtle: {
            digest(algorithm: string, data: BufferSource): Promise<ArrayBuffer>;
            importKey(
                format: string,
                keyData: BufferSource,
                algorithm: string | object,
                extractable: boolean,
                keyUsages: string[],
            ): Promise<CryptoKey>;
            encrypt(
                algorithm: string | object,
                key: CryptoKey,
                data: BufferSource,
            ): Promise<ArrayBuffer>;
            decrypt(
                algorithm: string | object,
                key: CryptoKey,
                data: BufferSource,
            ): Promise<ArrayBuffer>;
            deriveBits(
                algorithm: object,
                baseKey: CryptoKey,
                length: number,
            ): Promise<ArrayBuffer>;
        };
        getRandomValues<T extends ArrayBufferView<ArrayBufferLike>>(array: T): T;
    }
    Index

    Properties

    Methods

    Properties

    subtle: {
        digest(algorithm: string, data: BufferSource): Promise<ArrayBuffer>;
        importKey(
            format: string,
            keyData: BufferSource,
            algorithm: string | object,
            extractable: boolean,
            keyUsages: string[],
        ): Promise<CryptoKey>;
        encrypt(
            algorithm: string | object,
            key: CryptoKey,
            data: BufferSource,
        ): Promise<ArrayBuffer>;
        decrypt(
            algorithm: string | object,
            key: CryptoKey,
            data: BufferSource,
        ): Promise<ArrayBuffer>;
        deriveBits(
            algorithm: object,
            baseKey: CryptoKey,
            length: number,
        ): Promise<ArrayBuffer>;
    }

    Methods

    • Type Parameters

      • T extends ArrayBufferView<ArrayBufferLike>

      Parameters

      • array: T

      Returns T