1ebfcd9afSAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3ebfcd9afSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4ebfcd9afSAndrew Rist * or more contributor license agreements.  See the NOTICE file
5ebfcd9afSAndrew Rist * distributed with this work for additional information
6ebfcd9afSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7ebfcd9afSAndrew Rist * to you under the Apache License, Version 2.0 (the
8ebfcd9afSAndrew Rist * "License"); you may not use this file except in compliance
9ebfcd9afSAndrew Rist * with the License.  You may obtain a copy of the License at
10ebfcd9afSAndrew Rist *
11ebfcd9afSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12ebfcd9afSAndrew Rist *
13ebfcd9afSAndrew Rist * Unless required by applicable law or agreed to in writing,
14ebfcd9afSAndrew Rist * software distributed under the License is distributed on an
15ebfcd9afSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16ebfcd9afSAndrew Rist * KIND, either express or implied.  See the License for the
17ebfcd9afSAndrew Rist * specific language governing permissions and limitations
18ebfcd9afSAndrew Rist * under the License.
19ebfcd9afSAndrew Rist *
20ebfcd9afSAndrew Rist *************************************************************/
21ebfcd9afSAndrew Rist
22ebfcd9afSAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_embed_XEncryptionProtectedStorage_idl__
24cdf0e10cSrcweir#define __com_sun_star_embed_XEncryptionProtectedStorage_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_embed_XEncryptionProtectedSource2_idl__
27cdf0e10cSrcweir#include <com/sun/star/embed/XEncryptionProtectedSource2.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_beans_NamedValue_idl__
31cdf0e10cSrcweir#include <com/sun/star/beans/NamedValue.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
35cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_xml_crypto_DigestID_idl__
39cdf0e10cSrcweir#include <com/sun/star/xml/crypto/DigestID.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir
42cdf0e10cSrcweir#ifndef __com_sun_star_xml_crypto_CipherID_idl__
43cdf0e10cSrcweir#include <com/sun/star/xml/crypto/CipherID.idl>
44cdf0e10cSrcweir#endif
45cdf0e10cSrcweir
46cdf0e10cSrcweir//============================================================================
47cdf0e10cSrcweir
48cdf0e10cSrcweirmodule com {  module sun {  module star {  module embed {
49cdf0e10cSrcweir
50cdf0e10cSrcweir//============================================================================
51cdf0e10cSrcweir/** This interface allows to set a password for an object.
52cdf0e10cSrcweir
53*96af39f7SJürgen Schmidt    @since OpenOffice 3.4
54cdf0e10cSrcweir */
55cdf0e10cSrcweirinterface XEncryptionProtectedStorage: XEncryptionProtectedSource2
56cdf0e10cSrcweir{
57cdf0e10cSrcweir	// -----------------------------------------------------------------------
58cdf0e10cSrcweir	/** allows to set the encryption algorithms for the object.
59cdf0e10cSrcweir        <p>
60cdf0e10cSrcweir        The algorithms will of course be used only for streams that have been
61cdf0e10cSrcweir        marked to be encrypted. If no stream in the storage is marked to be
62cdf0e10cSrcweir        encrypted, the algorithms-related information may have no effect to
63cdf0e10cSrcweir        the result package.
64cdf0e10cSrcweir        </p>
65cdf0e10cSrcweir
66cdf0e10cSrcweir        <p>
67cdf0e10cSrcweir        The following values could be part of the provided sequence:
68cdf0e10cSrcweir        </p>
69cdf0e10cSrcweir        <dl>
70cdf0e10cSrcweir            <dt>StartKeyGenerationAlgorithm</dt>
71cdf0e10cSrcweir            <dd>
72cdf0e10cSrcweir                    specifies the algorithm that was used to generate
73cdf0e10cSrcweir                    the EncryptionKey from the original password; in case
74cdf0e10cSrcweir                    the contents should be decrypted, the algorithm might
75cdf0e10cSrcweir                    be already known by the object; if a different one is
76cdf0e10cSrcweir                    set an exception should be thrown to indicate the
77cdf0e10cSrcweir                    error; it should take values from
78cdf0e10cSrcweir                    <type scope="com::sun::star::xml:crypto">DigestID</type>.
79cdf0e10cSrcweir            </dd>
80cdf0e10cSrcweir            <dt>EncryptionAlgorithm</dt>
81cdf0e10cSrcweir            <dd>
82cdf0e10cSrcweir                    specifies the algorithm that should be used to
83cdf0e10cSrcweir                    encrypt/decrypt the contents; in case the contents
84cdf0e10cSrcweir                    should be decrypted, the algorithm might be already
85cdf0e10cSrcweir                    known by the object; if a different one is set
86cdf0e10cSrcweir                    an exception should be thrown to indicate the error;
87cdf0e10cSrcweir                    it should take values from
88cdf0e10cSrcweir                    <type scope="com::sun::star::xml:crypto">CipherID</type>.
89cdf0e10cSrcweir            </dd>
90cdf0e10cSrcweir            <dt>ChecksumAlgorithm</dt>
91cdf0e10cSrcweir            <dd>
92cdf0e10cSrcweir                    specifies the algorithm that was used to generate
93cdf0e10cSrcweir                    the checksum of the encrypted data; in case
94cdf0e10cSrcweir                    the contents should be decrypted, the algorithm might
95cdf0e10cSrcweir                    be already known by the object; if a different one is
96cdf0e10cSrcweir                    set an exception should be thrown to indicate the
97cdf0e10cSrcweir                    error; it should take values from
98cdf0e10cSrcweir                    <type scope="com::sun::star::xml:crypto">DigestID</type>.
99cdf0e10cSrcweir            </dd>
100cdf0e10cSrcweir        </dl>
101cdf0e10cSrcweir	 */
102cdf0e10cSrcweir    void setEncryptionAlgorithms( [in] sequence< ::com::sun::star::beans::NamedValue > aAlgorithms )
103cdf0e10cSrcweir		raises( ::com::sun::star::lang::IllegalArgumentException );
104cdf0e10cSrcweir
105cdf0e10cSrcweir	// -----------------------------------------------------------------------
106cdf0e10cSrcweir	/** allows to get the encryption algorithms of the object.
107cdf0e10cSrcweir	 */
108cdf0e10cSrcweir    sequence< ::com::sun::star::beans::NamedValue > getEncryptionAlgorithms();
109cdf0e10cSrcweir};
110cdf0e10cSrcweir
111cdf0e10cSrcweir//============================================================================
112cdf0e10cSrcweir
113cdf0e10cSrcweir}; }; }; };
114cdf0e10cSrcweir
115cdf0e10cSrcweir#endif
116cdf0e10cSrcweir
117