import { IEncrypted } from "../interfaces/IEncrypted"; import { Decryptable } from "../interfaces/decryptable.interface"; import { InitializerMetadata } from "../interfaces/initializer-metadata.interface"; import { EncArrayBuffer } from "../models/domain/enc-array-buffer"; import { EncString } from "../models/domain/enc-string"; import { SymmetricCryptoKey } from "../models/domain/symmetric-crypto-key"; export abstract class EncryptService { abstract encrypt(plainValue: string | ArrayBuffer, key: SymmetricCryptoKey): Promise; abstract encryptToBytes: ( plainValue: ArrayBuffer, key?: SymmetricCryptoKey ) => Promise; abstract decryptToUtf8: (encString: EncString, key: SymmetricCryptoKey) => Promise; abstract decryptToBytes: (encThing: IEncrypted, key: SymmetricCryptoKey) => Promise; abstract resolveLegacyKey: (key: SymmetricCryptoKey, encThing: IEncrypted) => SymmetricCryptoKey; abstract decryptItems: ( items: Decryptable[], key: SymmetricCryptoKey ) => Promise; }