UNPKG

@microsoft/useragent-sdk

Version:

SDK for building decentralized identity wallets and enterprise agents.

48 lines (47 loc) 1.8 kB
import { SubtleCrypto } from 'webcrypto-core'; /** * A dictionary of JWA encryption algorithm names to a crypto object */ export declare type CryptoSuiteMap = { [name: string]: SubtleCrypto; }; /** * Interface for the Crypto Algorithms Plugins */ export default abstract class CryptoOperations { /** * Gets all of the key encryption Algorithms from the plugin * @returns a subtle crypto object for key encryption/decryption */ abstract getKeyEncrypters(): SubtleCrypto; /** * Gets all of the key sharing encryption Algorithms from the plugin * @returns a subtle crypto object for key sharing encryption/decryption */ abstract getSharedKeyEncrypters(): SubtleCrypto; /** * Get all of the symmetric encrypter algorithms from the plugin * @returns a subtle crypto object for symmetric encryption/decryption */ abstract getSymmetricEncrypters(): SubtleCrypto; /** * Gets all of the message signing Algorithms from the plugin * @returns a subtle crypto object for message signing */ abstract getMessageSigners(): SubtleCrypto; /** * Gets all of the message authentication code signing Algorithms from the plugin. * Will be used for primitive operations such as key generation. * @returns a subtle crypto object for message signing */ abstract messageAuthenticationCodeSigners(): SubtleCrypto; /** * Gets all of the message digest Algorithms from the plugin. * @returns a subtle crypto object for message digests */ abstract getMessageDigests(): SubtleCrypto; /** * Returns the @class SubtleCrypto ipmplementation for the current environment */ abstract getSubtleCrypto(): SubtleCrypto; }