import { EncryptedData } from "./asymmetric-data-encryptor"; import { SignedData } from "./asymmetric-data-signer"; import { ApplicationDataEncryptorI } from "./application-data-encryptor"; import { JSONValue } from "encoding/json/types"; import { ExportedKey } from "encoding/key"; export interface DataEncryptorI { encrypt(jsonableObj: JSONValue): Promise; decrypt(encryptedData: EncryptedData): Promise; update(newData: JSONValue, existingEncryptedObject: EncryptedData, encryptedKeyOverride?: string): Promise; share(encryptedObject: EncryptedData, publicKeyObj: JsonWebKey): Promise; exportPublicKey(): Promise; sign(jsonableInput: JSONValue): Promise; verify(signedObject: SignedData): Promise; verifyAgainst(publicKeyObj: ExportedKey, signedObject: SignedData): Promise; createApplicationEncryptor(): Promise; loadApplicationEncryptorForEncryption(publicKeyObj: JsonWebKey): Promise; loadApplicationEncryptorForDecryption(publicKeyObj: JsonWebKey, encryptedPrivateKey: EncryptedData): Promise; } export declare function DataEncryptor(encryptionKeyPair: CryptoKeyPair, signingKeyPair: CryptoKeyPair): DataEncryptorI; export declare namespace DataEncryptor { var getDefaultAsymmetricEncryptionAlgorithm: () => RsaHashedKeyGenParams; var generateAsymmetricEncryptionKeyPair: () => Promise; var getDefaultSigningAlgorithm: () => RsaHashedKeyGenParams; var generateSigningKeyPair: () => Promise; }