import ResourceLocator from './ResourceLocator.js';
import PolicyInterface from '../interfaces/PolicyInterface.js';
import CipherEnum from '../enum/CipherEnum.js';
import CurveNameEnum from '../enum/CurveNameEnum.js';
/**
 * NanoTDF Header
 *
 * The header section is intended to be sent to a KAS and is used by the KAS to derive the decryption key that can
 * decrypts the nanotdf's payload. The Header is structured as follows:
 *
 * | Section                | Minimum Length (B) | Maximum Length (B) |
 * |------------------------|--------------------|--------------------|
 * | Magic Number + Version | 3                  | 3                  |
 * | KAS (resource locator) | 3                  | 257                |
 * | ECC Mode               | 1                  | 1                  |
 * | Payload + Sig Mode     | 1                  | 1                  |
 * | Policy                 | 3                  | 257                |
 * | Ephemeral Key          | 33                 | 67                 |
 *
 */
export default class Header {
    static readonly MAGIC_NUMBER_VERSION_BYTE_OFF = 0;
    static readonly MAGIC_NUMBER_VERSION_BYTE_LEN = 3;
    static readonly MAGIC_NUMBER_OFFSET = 0;
    static readonly MAGIC_NUMBER_LENGTH = 18;
    static readonly ECC_BINDING_MODE_BYTE_LEN = 1;
    static readonly USE_ECDSA_BINDING_BIT_OFF = 0;
    static readonly EPHEMERAL_ECC_CURVE_NAME_BIT_OFF = -3;
    static readonly SYMMETRIC_PAYLOAD_CONFIG_BYTE_LEN = 1;
    static readonly HAS_SIGNATURE_BIT_OFF = 1;
    static readonly HAS_SIGNATURE_BIT_LEN = 1;
    static readonly SIGNATURE_ECC_CURVE_NAME_BIT_OFF = 1;
    static readonly SIGNATURE_ECC_CURVE_NAME_BIT_LEN = 3;
    static readonly SYMMETRIC_CIPHER_BIT_OFF = 4;
    static readonly SYMMETRIC_CIPHER_BIT_LEN = 4;
    magicNumberVersion: Uint8Array;
    kas: ResourceLocator;
    useECDSABinding: boolean;
    ephemeralCurveName: CurveNameEnum;
    hasSignature: boolean;
    signatureCurveName: CurveNameEnum;
    symmetricCipher: CipherEnum;
    authTagLength: number;
    policy: PolicyInterface;
    ephemeralPublicKey: Uint8Array;
    static parse(buff: Uint8Array, legacyTDF?: boolean): {
        header: Header;
        offset: number;
    };
    constructor(magicNumberVersion: Uint8Array, kas: ResourceLocator, useECDSABinding: boolean, ephemeralCurveName: CurveNameEnum, hasSignature: boolean, signatureCurveName: CurveNameEnum, symmetricCipher: CipherEnum, policy: PolicyInterface, ephemeralPublicKey: Uint8Array);
    /**
     * Copy the contents of the header to buffer
     */
    copyToBuffer(buffer: Uint8Array): void;
    /**
     * Length
     *
     * @returns { number } Length of header
     */
    get length(): number;
    /**
     * Return nanoTDF header as buffer
     *
     * Warning: This method will allocate memory of length of the header, use
     * copyToBuffer() when copy is not needed.
     */
    toBuffer(): ArrayBuffer;
    /**
     * Get KAS Rewrap URL
     */
    getKasRewrapUrl(): string;
}
//# sourceMappingURL=Header.d.ts.map