import { EncryptedData } from "./asymmetric-data-encryptor"; import { JSONValue } from "encoding/json/types"; import { HalfCryptoKeyPair } from "encryption/types"; export interface ApplicationDataEncryptorI { encrypt(jsonableInput: JSONValue): Promise; decrypt(encryptedObj: EncryptedData, encryptedKeyOverride?: string): Promise; update(newData: JSONValue, existingEncryptedObject: EncryptedData, encryptedKeyOverride?: string): Promise; share(encryptedObj: EncryptedData, publicKeyObj: JsonWebKey, sharedDataKey: string): Promise; exportPublicKey(): Promise; encryptPrivateKey(publicKeyObjToShareWith: JsonWebKey): Promise; } export declare function ApplicationDataEncryptor(encryptionKeyPair: CryptoKeyPair | HalfCryptoKeyPair): ApplicationDataEncryptorI; export declare namespace ApplicationDataEncryptor { var getDefaultAlgorithm: () => RsaHashedKeyGenParams; var generateKeyPair: () => Promise; var create: () => Promise; var decodePublicKey: (publicKeyObj: JsonWebKey) => Promise; var loadForEncryption: (publicKeyObj: JsonWebKey) => Promise; var loadForDecryption: (publicKeyObj: JsonWebKey, usersPrivateKey: CryptoKey, encryptedPrivateKey: EncryptedData) => Promise; }