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