import { SecureDelegation } from '../../icc-api/model/SecureDelegation';
import { UserEncryptionKeysManager } from './UserEncryptionKeysManager';
import { CryptoPrimitives } from './CryptoPrimitives';
/**
 * @internal this class is for internal use only and may be changed without notice.
 */
export declare class SecureDelegationsEncryption {
    private readonly userKeys;
    private readonly primitives;
    constructor(userKeys: UserEncryptionKeysManager, primitives: CryptoPrimitives);
    /**
     * WARNING: this values should be ALWAYS be the string 'Cure' and its utf-8 bytes. If changed, it would not be possible to decrypt old secretIds and owningEntityIds
     * anymore.
     * @private
     */
    private readonly decryptionValidatorPrefix;
    private readonly decryptionValidatorBytes;
    /**
     * Check if a Uint8Array or an Array buffer contains the decryption validator prefix.
     * @param bytes an ArrayBuffer or Uint8Array to verify.
     * @return true if the buffer contains the prefix, false otherwise.
     */
    private prefixVerification;
    /**
     * If the secure delegation has an encrypted exchange data id attempts to decrypt it with the available keys for the current user.
     * @param encryptedExchangeIds a map that associates an encrypted exchange data id to the fingerprint of the public key used to encrypt it.
     * @return the id of the exchange data used for the encryption of the provided secure delegation if it was encrypted and could be decrypted,
     * undefined otherwise (there was no encrypted id of the exchange data, or it could not be decrypted as no key was available).
     */
    decryptExchangeDataId(encryptedExchangeIds: {
        [fp: string]: string;
    }): Promise<string | undefined>;
    /**
     * Encrypts the exchange data id for a secure delegation. To avoid leaks of sensitive data the provided public keys should be only keys of users
     * which DO NOT REQUIRE anonymous delegations
     */
    encryptExchangeDataId(exchangeDataId: string, publicKeys: {
        [fp: string]: CryptoKey;
    }): Promise<{
        [fp: string]: string;
    }>;
    encryptEncryptionKey(hexKey: string, key: CryptoKey): Promise<string>;
    encryptEncryptionKeys(hexKeys: string[], key: CryptoKey): Promise<string[]>;
    decryptEncryptionKey(encrypted: string, key: CryptoKey): Promise<string>;
    decryptEncryptionKeys(delegation: SecureDelegation, key: CryptoKey): Promise<string[]>;
    encryptSecretId(secretId: string, key: CryptoKey): Promise<string>;
    encryptSecretIds(secretIds: string[], key: CryptoKey): Promise<string[]>;
    decryptSecretId(encrypted: string, key: CryptoKey): Promise<string>;
    decryptSecretIds(delegation: SecureDelegation, key: CryptoKey): Promise<string[]>;
    encryptOwningEntityId(owningEntityId: string, key: CryptoKey): Promise<string>;
    encryptOwningEntityIds(owningEntityIds: string[], key: CryptoKey): Promise<string[]>;
    decryptOwningEntityId(encrypted: string, key: CryptoKey): Promise<string>;
    decryptOwningEntityIds(delegation: SecureDelegation, key: CryptoKey): Promise<string[]>;
}
