remove assert looking for new compatibilityMode DOCX
[LibreOffice.git] / offapi / com / sun / star / embed / XEncryptionProtectedStorage.idl
blobda14714c6223de3edef9a1e55805a42d00418917
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
21 module com { module sun { module star { module embed {
23 /** This interface allows to set a password for an object.
25 @since OOo 3.4
27 interface XEncryptionProtectedStorage: XEncryptionProtectedSource2
29 /** allows to set the encryption algorithms for the object.
30 <p>
31 The algorithms will of course be used only for streams that have been
32 marked to be encrypted. If no stream in the storage is marked to be
33 encrypted, the algorithms-related information may have no effect to
34 the result package.
35 </p>
37 <p>
38 The following values could be part of the provided sequence:
39 </p>
40 <dl>
41 <dt>StartKeyGenerationAlgorithm</dt>
42 <dd>
43 specifies the algorithm that was used to generate
44 the EncryptionKey from the original password; in case
45 the contents should be decrypted, the algorithm might
46 be already known by the object; if a different one is
47 set an exception should be thrown to indicate the
48 error; it should take values from
49 com::sun::star::xml:crypto::DigestID.
50 </dd>
51 <dt>KeyDerivationFunction</dt>
52 <dd>
53 specifies the algorithm that was used to derive the
54 encryption key from the password; it is applied to
55 the result of the StartKeyGenerationAlgorithm;
56 it should take values from
57 com::sun::star::xml:crypto::KDFID.
58 </dd>
59 <dt>EncryptionAlgorithm</dt>
60 <dd>
61 specifies the algorithm that should be used to
62 encrypt/decrypt the contents; in case the contents
63 should be decrypted, the algorithm might be already
64 known by the object; if a different one is set
65 an exception should be thrown to indicate the error;
66 it should take values from
67 com::sun::star::xml:crypto::CipherID.
68 </dd>
69 <dt>ChecksumAlgorithm</dt>
70 <dd>
71 specifies the algorithm that was used to generate
72 the checksum of the encrypted data; in case
73 the contents should be decrypted, the algorithm might
74 be already known by the object; if a different one is
75 set an exception should be thrown to indicate the
76 error; it should take values from
77 com::sun::star::xml:crypto::DigestID.
78 </dd>
79 </dl>
81 void setEncryptionAlgorithms( [in] sequence< ::com::sun::star::beans::NamedValue > aAlgorithms )
82 raises( ::com::sun::star::lang::IllegalArgumentException );
84 /** allows to get the encryption algorithms of the object.
86 sequence< ::com::sun::star::beans::NamedValue > getEncryptionAlgorithms();
88 /** set OpenPGP-specific encryption properties
90 <p>
91 When provided, switch ODF package encryption to OpenPGP.
92 </p>
93 <p>
94 For each recipient, add one sequence of named values, each of
95 the same structure. The following values could be part of that
96 provided sequence:
97 </p>
98 <dl>
99 <dt>KeyId</dt>
100 <dd>
101 specifies OpenPGP key ID or fingerprint of the public
102 key used to encrypt this session key against
103 </dd>
104 <dt>KeyPacket</dt>
105 <dd>
106 (optional) public key packet of the key used to encrypt
107 </dd>
108 <dt>CipherValue</dt>
109 <dd>
110 OpenPGP-encrypted session key for this recipient
111 </dd>
112 </dl>
114 @since LibreOffice 6.0
116 void setGpgProperties( [in] sequence< sequence< ::com::sun::star::beans::NamedValue > > aProps )
117 raises( ::com::sun::star::lang::IllegalArgumentException );
121 }; }; }; };
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */