@bicycle-codes/keys
    Preparing search index...

    Variable AESConst

    AES: {
        encrypt: {
            (
                data: Uint8Array,
                cryptoKey: Uint8Array<ArrayBufferLike> | CryptoKey,
                format?: undefined,
                iv?: Uint8Array<ArrayBufferLike>,
            ): Promise<Uint8Array<ArrayBufferLike>>;
            (
                data: Uint8Array,
                cryptoKey: Uint8Array<ArrayBufferLike> | CryptoKey,
                format: "uint8array",
                iv?: Uint8Array<ArrayBufferLike>,
            ): Promise<Uint8Array<ArrayBufferLike>>;
            (
                data: Uint8Array,
                cryptoKey: Uint8Array<ArrayBufferLike> | CryptoKey,
                format: "arraybuffer",
                iv?: Uint8Array<ArrayBufferLike>,
            ): Promise<ArrayBuffer>;
        };
        export: (key: CryptoKey) => Promise<Uint8Array<ArrayBufferLike>> & {
            asString: (
                key: CryptoKey,
                format?: SupportedEncodings,
            ) => Promise<string>;
        };
        create(opts?: { alg: string; length: number }): Promise<CryptoKey>;
        decrypt(
            encryptedData: string | ArrayBuffer | Uint8Array<ArrayBufferLike>,
            cryptoKey: ArrayBuffer | Uint8Array<ArrayBufferLike> | CryptoKey,
            iv?: Uint8Array<ArrayBufferLike>,
        ): Promise<Uint8Array<ArrayBufferLike>>;
        exportAsString(key: CryptoKey): Promise<string>;
        import(key: string | Uint8Array<ArrayBufferLike>): Promise<CryptoKey>;
    } = ...

    Type declaration

    • encrypt: {
          (
              data: Uint8Array,
              cryptoKey: Uint8Array<ArrayBufferLike> | CryptoKey,
              format?: undefined,
              iv?: Uint8Array<ArrayBufferLike>,
          ): Promise<Uint8Array<ArrayBufferLike>>;
          (
              data: Uint8Array,
              cryptoKey: Uint8Array<ArrayBufferLike> | CryptoKey,
              format: "uint8array",
              iv?: Uint8Array<ArrayBufferLike>,
          ): Promise<Uint8Array<ArrayBufferLike>>;
          (
              data: Uint8Array,
              cryptoKey: Uint8Array<ArrayBufferLike> | CryptoKey,
              format: "arraybuffer",
              iv?: Uint8Array<ArrayBufferLike>,
          ): Promise<ArrayBuffer>;
      }
    • export: (key: CryptoKey) => Promise<Uint8Array<ArrayBufferLike>> & {
          asString: (
              key: CryptoKey,
              format?: SupportedEncodings,
          ) => Promise<string>;
      }
    • create: function
      • Parameters

        • opts: { alg: string; length: number } = ...

        Returns Promise<CryptoKey>

    • decrypt: function
      • Parameters

        • encryptedData: string | ArrayBuffer | Uint8Array<ArrayBufferLike>
        • cryptoKey: ArrayBuffer | Uint8Array<ArrayBufferLike> | CryptoKey
        • Optionaliv: Uint8Array<ArrayBufferLike>

        Returns Promise<Uint8Array<ArrayBufferLike>>

    • exportAsString: function
      • Parameters

        • key: CryptoKey

        Returns Promise<string>

    • import: function
      • Parameters

        • key: string | Uint8Array<ArrayBufferLike>

        Returns Promise<CryptoKey>