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