1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_PACKAGE_INC_PACKAGECONSTANTS_HXX
20 #define INCLUDED_PACKAGE_INC_PACKAGECONSTANTS_HXX
22 #include <sal/types.h>
24 const sal_Int32 n_ConstBufferSize
= 32768;
26 // by calculation of the digest we read 32 bytes more ( if available )
27 // it allows to ignore the padding if the stream is longer than n_ConstDigestDecrypt since we read at least two blocks more;
28 // if the stream is shorter or equal the padding will be done successfully
29 const sal_Int32 n_ConstDigestLength
= 1024;
30 const sal_Int32 n_ConstDigestDecrypt
= 1056; // 1024 + 32
32 // the constants related to the manifest.xml entries
33 #define PKG_MNFST_FULLPATH 0 //FullPath (Put full-path property first for MBA)
34 #define PKG_MNFST_VERSION 1 //Version
35 #define PKG_MNFST_MEDIATYPE 2 //MediaType
37 #define PKG_MNFST_INIVECTOR 3 //InitialisationVector
38 #define PKG_MNFST_SALT 4 //Salt
39 #define PKG_MNFST_ITERATION 5 //IterationCount
40 #define PKG_MNFST_UCOMPSIZE 6 //Size
41 #define PKG_MNFST_DIGEST 7 //Digest
42 #define PKG_MNFST_ENCALG 8 //EncryptionAlgorithm
43 #define PKG_MNFST_STARTALG 9 //StartKeyAlgorithm
44 #define PKG_MNFST_DIGESTALG 10 //DigestAlgorithm
45 #define PKG_MNFST_DERKEYSIZE 11 //DerivedKeySize
47 #define PKG_SIZE_NOENCR_MNFST 3
48 #define PKG_SIZE_ENCR_MNFST 12
50 // the properties related constants
51 #define ENCRYPTION_KEY_PROPERTY "EncryptionKey"
52 #define STORAGE_ENCRYPTION_KEYS_PROPERTY "StorageEncryptionKeys"
53 #define ENCRYPTION_ALGORITHMS_PROPERTY "EncryptionAlgorithms"
54 #define ENCRYPTION_GPG_PROPERTIES "EncryptionGpGProperties"
55 #define HAS_ENCRYPTED_ENTRIES_PROPERTY "HasEncryptedEntries"
56 #define HAS_NONENCRYPTED_ENTRIES_PROPERTY "HasNonEncryptedEntries"
57 #define IS_INCONSISTENT_PROPERTY "IsInconsistent"
58 #define MEDIATYPE_FALLBACK_USED_PROPERTY "MediaTypeFallbackUsed"
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */