UNPKG

@microsoft/useragent-sdk

Version:

SDK for building decentralized identity wallets and enterprise agents.

46 lines (45 loc) 1.35 kB
/// <reference types="node" /> /// <reference types="pouchdb-core" /> import CryptoFactory from '../../plugin/CryptoFactory'; import { JwsHeader } from './jws/IJwsGeneralJson'; /** * Define different types for the algorithm parameter */ export declare type CryptoAlgorithm = RsaPssParams | EcdsaParams | Algorithm; /** * Interface defining options for JOSE operations. */ export interface IJoseOptions { cryptoFactory: CryptoFactory; protected?: JwsHeader; header?: JwsHeader; kidPrefix?: string; [key: string]: any; } /** * Interface defining signature options. * Need to redefine the location of this interface - todo */ export interface IJwsSigningOptions extends IJoseOptions { } /** * Interface defining encryption options. */ export interface IJweEncryptionOptions extends IJoseOptions { /** * The content encryption algorithm in JWA format */ contentEncryptionAlgorithm: string; /** * The content key encryption key. * Remark: Only used for testing with reference data. * Should be undefined in production code. */ contentEncryptionKey?: Buffer; /** * The initial vector. * Remark: Only used for testing with reference data. * Should be undefined in production code. */ initialVector?: Buffer; }