Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / embed / XEncryptionProtectedStorage.idl
blob5ddcc68318447e69785228f8f93c40ec0e854425
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 .
19 #ifndef __com_sun_star_embed_XEncryptionProtectedStorage_idl__
20 #define __com_sun_star_embed_XEncryptionProtectedStorage_idl__
22 #include <com/sun/star/embed/XEncryptionProtectedSource2.idl>
23 #include <com/sun/star/beans/NamedValue.idl>
24 #include <com/sun/star/lang/IllegalArgumentException.idl>
25 #include <com/sun/star/xml/crypto/DigestID.idl>
26 #include <com/sun/star/xml/crypto/CipherID.idl>
29 module com { module sun { module star { module embed {
31 /** This interface allows to set a password for an object.
33 @since OOo 3.4
35 interface XEncryptionProtectedStorage: XEncryptionProtectedSource2
37 /** allows to set the encryption algorithms for the object.
38 <p>
39 The algorithms will of course be used only for streams that have been
40 marked to be encrypted. If no stream in the storage is marked to be
41 encrypted, the algorithms-related information may have no effect to
42 the result package.
43 </p>
45 <p>
46 The following values could be part of the provided sequence:
47 </p>
48 <dl>
49 <dt>StartKeyGenerationAlgorithm</dt>
50 <dd>
51 specifies the algorithm that was used to generate
52 the EncryptionKey from the original password; in case
53 the contents should be decrypted, the algorithm might
54 be already known by the object; if a different one is
55 set an exception should be thrown to indicate the
56 error; it should take values from
57 com::sun::star::xml:crypto::DigestID.
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();
90 }; }; }; };
92 #endif
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */