update dev300-m58
[ooovba.git] / package / inc / EncryptedDataHeader.hxx
blobaefa52e5ed8c7ef199e0e35cc4e3fa8525042e98
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: EncryptedDataHeader.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _ENCRYPTED_DATA_HEADER_HXX_
31 #define _ENCRYPTED_DATA_HEADER_HXX_
33 #include <sal/types.h>
35 /* The structure of this header is as follows:
37 Header signature 4 bytes
38 Version number 2 bytes
39 Iteraction count 4 bytes
40 Size 4 bytes
41 Salt length 2 bytes
42 IV length 2 bytes
43 Digest length 2 bytes
44 MediaType length 2 bytes
45 Salt content X bytes
46 IV content X bytes
47 digest content X bytes
48 MediaType X bytes
51 const sal_uInt32 n_ConstHeader = 0x0502474dL; // "MG\002\005"
52 const sal_Int32 n_ConstHeaderSize = 22; // + salt length + iv length + digest length + mediatype length
53 const sal_Int16 n_ConstCurrentVersion = 1;
54 #endif