export interface AESUtils {
    encryptWithRawKey(rawKey: string, plainData: ArrayBuffer | Uint8Array): Promise<ArrayBuffer>;
    encrypt(cryptoKey: CryptoKey, plainData: ArrayBuffer | Uint8Array, rawKey?: string): Promise<ArrayBuffer>;
    decryptWithRawKey(rawKey: string, plainData: ArrayBuffer | Uint8Array): Promise<ArrayBuffer>;
    /**
     *
     * @param cryptoKey (CryptoKey)
     * @param encryptedData (ArrayBuffer)
     * @param rawKey
     * @returns {Promise} will be ArrayBuffer
     */
    decrypt(cryptoKey: CryptoKey, encryptedData: ArrayBuffer | Uint8Array, rawKey?: string): Promise<ArrayBuffer>;
    /**
     * @deprecated this method is not correct: in some cases decryption may not fail even if the wrong key is used: if the
     * first provided keys are wrong and the last one is correct the decryption will succeed for sure, but there is a small
     * chance that you will get garbage
     */
    decryptSome(cryptoKeys: CryptoKey[], uint8Array: Uint8Array): Promise<ArrayBuffer>;
    /**
     *
     * @param toHex boolean, if true, it returns hex String
     * @returns {Promise} either Hex string or CryptoKey
     */
    generateCryptoKey(toHex: false): Promise<CryptoKey>;
    generateCryptoKey(toHex: true): Promise<string>;
    generateCryptoKey(toHex: boolean): Promise<string | CryptoKey>;
    generateIV(ivByteLength: number): Uint8Array;
    /**
     * This function return a promise which will be the key Format will be either 'raw' or 'jwk'.
     * JWK: Json Web key (ref. http://tools.ietf.org/html/draft-ietf-jose-json-web-key-11)
     *
     * @param cryptoKey CryptoKey
     * @param format will be 'raw' or 'jwk'
     * @returns {Promise} will the AES Key
     */
    exportKey(cryptoKey: CryptoKey, format: 'raw'): Promise<ArrayBuffer>;
    exportKey(cryptoKey: CryptoKey, format: 'jwk'): Promise<JsonWebKey>;
    exportKey(cryptoKey: CryptoKey, format: 'jwk' | 'raw'): Promise<ArrayBuffer | JsonWebKey>;
    /**
     * the ability to import a key that have already been created elsewhere, for use within the web
     * application that is invoking the import function, for use within the importing web application's
     * origin. This necessiates an interoperable key format, such as JSON Web Key [JWK] which may be
     * represented as octets.
     *
     * https://chromium.googlesource.com/chromium/blink.git/+/6b902997e3ca0384c8fa6fe56f79ecd7589d3ca6/LayoutTests/crypto/resources/common.js
     *
     * @param format 'raw' or 'jwk'
     * @param aesKey
     * @returns {*}
     */
    importKey(format: 'jwk' | 'raw', aesKey: JsonWebKey | ArrayBuffer | Uint8Array): Promise<CryptoKey>;
}
export declare class AESUtilsImpl implements AESUtils {
    /********* AES Config **********/
    ivLength: number;
    aesAlgorithmEncryptName: string;
    aesKeyGenParams: AesKeyGenParams;
    private crypto;
    private _debug;
    set debug(value: boolean);
    constructor(crypto?: Crypto);
    encryptWithRawKey(rawKey: string, plainData: ArrayBuffer | Uint8Array): Promise<ArrayBuffer>;
    encrypt(cryptoKey: CryptoKey, plainData: ArrayBuffer | Uint8Array, rawKey?: string): Promise<ArrayBuffer>;
    decryptWithRawKey(rawKey: string, plainData: ArrayBuffer | Uint8Array): Promise<ArrayBuffer>;
    /**
     *
     * @param cryptoKey (CryptoKey)
     * @param encryptedData (ArrayBuffer)
     * @param rawKey
     * @returns {Promise} will be ArrayBuffer
     */
    decrypt(cryptoKey: CryptoKey, encryptedData: ArrayBuffer | Uint8Array, rawKey?: string): Promise<ArrayBuffer>;
    decryptSome(cryptoKeys: CryptoKey[], uint8Array: Uint8Array): Promise<ArrayBuffer>;
    /**
     *
     * @param toHex boolean, if true, it returns hex String
     * @returns {Promise} either Hex string or CryptoKey
     */
    generateCryptoKey(toHex: false): Promise<CryptoKey>;
    generateCryptoKey(toHex: true): Promise<string>;
    generateIV(ivByteLength: number): Uint8Array;
    /**
     * This function return a promise which will be the key Format will be either 'raw' or 'jwk'.
     * JWK: Json Web key (ref. http://tools.ietf.org/html/draft-ietf-jose-json-web-key-11)
     *
     * @param cryptoKey CryptoKey
     * @param format will be 'raw' or 'jwk'
     * @returns {Promise} will the AES Key
     */
    exportKey(cryptoKey: CryptoKey, format: 'raw'): Promise<ArrayBuffer>;
    exportKey(cryptoKey: CryptoKey, format: 'jwk'): Promise<JsonWebKey>;
    /**
     * the ability to import a key that have already been created elsewhere, for use within the web
     * application that is invoking the import function, for use within the importing web application's
     * origin. This necessiates an interoperable key format, such as JSON Web Key [JWK] which may be
     * represented as octets.
     *
     * https://chromium.googlesource.com/chromium/blink.git/+/6b902997e3ca0384c8fa6fe56f79ecd7589d3ca6/LayoutTests/crypto/resources/common.js
     *
     * @param format 'raw' or 'jwk'
     * @param aesKey
     * @returns {*}
     */
    importKey(format: 'jwk' | 'raw', aesKey: JsonWebKey | ArrayBuffer | Uint8Array): Promise<CryptoKey>;
}
export declare const AES: AESUtilsImpl;
