Type alias Implementation

Implementation: {
    aes: {
        decrypt: ((encrypted: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array) => Promise<Uint8Array>);
        encrypt: ((data: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array) => Promise<Uint8Array>);
        exportKey: ((key: CryptoKey) => Promise<Uint8Array>);
        genKey: ((alg: SymmAlg) => Promise<CryptoKey>);
    };
    did: {
        keyTypes: Record<string, {
            magicBytes: Uint8Array;
            verify: ((args: VerifyArgs) => Promise<boolean>);
        }>;
    };
    hash: {
        sha256: ((bytes: Uint8Array) => Promise<Uint8Array>);
    };
    keystore: {
        clearStore: (() => Promise<void>);
        decrypt: ((encrypted: Uint8Array) => Promise<Uint8Array>);
        exportSymmKey: ((name: string) => Promise<Uint8Array>);
        getAlgorithm: (() => Promise<string>);
        getUcanAlgorithm: (() => Promise<string>);
        importSymmKey: ((key: Uint8Array, name: string) => Promise<void>);
        keyExists: ((keyName: string) => Promise<boolean>);
        publicExchangeKey: (() => Promise<Uint8Array>);
        publicWriteKey: (() => Promise<Uint8Array>);
        sign: ((message: Uint8Array) => Promise<Uint8Array>);
    };
    misc: {
        randomNumbers: ((options: {
            amount: number;
        }) => Uint8Array);
    };
    rsa: {
        decrypt: ((data: Uint8Array, privateKey: CryptoKey | Uint8Array) => Promise<Uint8Array>);
        encrypt: ((message: Uint8Array, publicKey: CryptoKey | Uint8Array) => Promise<Uint8Array>);
        exportPublicKey: ((key: CryptoKey) => Promise<Uint8Array>);
        genKey: (() => Promise<CryptoKeyPair>);
    };
}

Type declaration

  • aes: {
        decrypt: ((encrypted: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array) => Promise<Uint8Array>);
        encrypt: ((data: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array) => Promise<Uint8Array>);
        exportKey: ((key: CryptoKey) => Promise<Uint8Array>);
        genKey: ((alg: SymmAlg) => Promise<CryptoKey>);
    }
    • decrypt: ((encrypted: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array) => Promise<Uint8Array>)
        • (encrypted: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array): Promise<Uint8Array>
        • Parameters

          • encrypted: Uint8Array
          • key: CryptoKey | Uint8Array
          • alg: SymmAlg
          • Optional iv: Uint8Array

          Returns Promise<Uint8Array>

    • encrypt: ((data: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array) => Promise<Uint8Array>)
        • (data: Uint8Array, key: CryptoKey | Uint8Array, alg: SymmAlg, iv?: Uint8Array): Promise<Uint8Array>
        • Parameters

          • data: Uint8Array
          • key: CryptoKey | Uint8Array
          • alg: SymmAlg
          • Optional iv: Uint8Array

          Returns Promise<Uint8Array>

    • exportKey: ((key: CryptoKey) => Promise<Uint8Array>)
        • (key: CryptoKey): Promise<Uint8Array>
        • Parameters

          • key: CryptoKey

          Returns Promise<Uint8Array>

    • genKey: ((alg: SymmAlg) => Promise<CryptoKey>)
        • (alg: SymmAlg): Promise<CryptoKey>
        • Parameters

          • alg: SymmAlg

          Returns Promise<CryptoKey>

  • did: {
        keyTypes: Record<string, {
            magicBytes: Uint8Array;
            verify: ((args: VerifyArgs) => Promise<boolean>);
        }>;
    }
  • hash: {
        sha256: ((bytes: Uint8Array) => Promise<Uint8Array>);
    }
    • sha256: ((bytes: Uint8Array) => Promise<Uint8Array>)
        • (bytes: Uint8Array): Promise<Uint8Array>
        • Parameters

          • bytes: Uint8Array

          Returns Promise<Uint8Array>

  • keystore: {
        clearStore: (() => Promise<void>);
        decrypt: ((encrypted: Uint8Array) => Promise<Uint8Array>);
        exportSymmKey: ((name: string) => Promise<Uint8Array>);
        getAlgorithm: (() => Promise<string>);
        getUcanAlgorithm: (() => Promise<string>);
        importSymmKey: ((key: Uint8Array, name: string) => Promise<void>);
        keyExists: ((keyName: string) => Promise<boolean>);
        publicExchangeKey: (() => Promise<Uint8Array>);
        publicWriteKey: (() => Promise<Uint8Array>);
        sign: ((message: Uint8Array) => Promise<Uint8Array>);
    }
    • clearStore: (() => Promise<void>)
        • (): Promise<void>
        • Returns Promise<void>

    • decrypt: ((encrypted: Uint8Array) => Promise<Uint8Array>)
        • (encrypted: Uint8Array): Promise<Uint8Array>
        • Parameters

          • encrypted: Uint8Array

          Returns Promise<Uint8Array>

    • exportSymmKey: ((name: string) => Promise<Uint8Array>)
        • (name: string): Promise<Uint8Array>
        • Parameters

          • name: string

          Returns Promise<Uint8Array>

    • getAlgorithm: (() => Promise<string>)
        • (): Promise<string>
        • Returns Promise<string>

    • getUcanAlgorithm: (() => Promise<string>)
        • (): Promise<string>
        • Returns Promise<string>

    • importSymmKey: ((key: Uint8Array, name: string) => Promise<void>)
        • (key: Uint8Array, name: string): Promise<void>
        • Parameters

          • key: Uint8Array
          • name: string

          Returns Promise<void>

    • keyExists: ((keyName: string) => Promise<boolean>)
        • (keyName: string): Promise<boolean>
        • Parameters

          • keyName: string

          Returns Promise<boolean>

    • publicExchangeKey: (() => Promise<Uint8Array>)
        • (): Promise<Uint8Array>
        • Returns Promise<Uint8Array>

    • publicWriteKey: (() => Promise<Uint8Array>)
        • (): Promise<Uint8Array>
        • Returns Promise<Uint8Array>

    • sign: ((message: Uint8Array) => Promise<Uint8Array>)
        • (message: Uint8Array): Promise<Uint8Array>
        • Parameters

          • message: Uint8Array

          Returns Promise<Uint8Array>

  • misc: {
        randomNumbers: ((options: {
            amount: number;
        }) => Uint8Array);
    }
    • randomNumbers: ((options: {
          amount: number;
      }) => Uint8Array)
        • (options: {
              amount: number;
          }): Uint8Array
        • Parameters

          • options: {
                amount: number;
            }
            • amount: number

          Returns Uint8Array

  • rsa: {
        decrypt: ((data: Uint8Array, privateKey: CryptoKey | Uint8Array) => Promise<Uint8Array>);
        encrypt: ((message: Uint8Array, publicKey: CryptoKey | Uint8Array) => Promise<Uint8Array>);
        exportPublicKey: ((key: CryptoKey) => Promise<Uint8Array>);
        genKey: (() => Promise<CryptoKeyPair>);
    }
    • decrypt: ((data: Uint8Array, privateKey: CryptoKey | Uint8Array) => Promise<Uint8Array>)
        • (data: Uint8Array, privateKey: CryptoKey | Uint8Array): Promise<Uint8Array>
        • Parameters

          • data: Uint8Array
          • privateKey: CryptoKey | Uint8Array

          Returns Promise<Uint8Array>

    • encrypt: ((message: Uint8Array, publicKey: CryptoKey | Uint8Array) => Promise<Uint8Array>)
        • (message: Uint8Array, publicKey: CryptoKey | Uint8Array): Promise<Uint8Array>
        • Parameters

          • message: Uint8Array
          • publicKey: CryptoKey | Uint8Array

          Returns Promise<Uint8Array>

    • exportPublicKey: ((key: CryptoKey) => Promise<Uint8Array>)
        • (key: CryptoKey): Promise<Uint8Array>
        • Parameters

          • key: CryptoKey

          Returns Promise<Uint8Array>

    • genKey: (() => Promise<CryptoKeyPair>)
        • (): Promise<CryptoKeyPair>
        • Returns Promise<CryptoKeyPair>

Generated using TypeDoc