1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27#ifndef __com_sun_star_embed_XEncryptionProtectedStorage_idl__ 28#define __com_sun_star_embed_XEncryptionProtectedStorage_idl__ 29 30#ifndef __com_sun_star_embed_XEncryptionProtectedSource2_idl__ 31#include <com/sun/star/embed/XEncryptionProtectedSource2.idl> 32#endif 33 34#ifndef __com_sun_star_beans_NamedValue_idl__ 35#include <com/sun/star/beans/NamedValue.idl> 36#endif 37 38#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 39#include <com/sun/star/lang/IllegalArgumentException.idl> 40#endif 41 42#ifndef __com_sun_star_xml_crypto_DigestID_idl__ 43#include <com/sun/star/xml/crypto/DigestID.idl> 44#endif 45 46#ifndef __com_sun_star_xml_crypto_CipherID_idl__ 47#include <com/sun/star/xml/crypto/CipherID.idl> 48#endif 49 50//============================================================================ 51 52module com { module sun { module star { module embed { 53 54//============================================================================ 55/** This interface allows to set a password for an object. 56 57 @since OOo 3.4 58 */ 59interface XEncryptionProtectedStorage: XEncryptionProtectedSource2 60{ 61 // ----------------------------------------------------------------------- 62 /** allows to set the encryption algorithms for the object. 63 <p> 64 The algorithms will of course be used only for streams that have been 65 marked to be encrypted. If no stream in the storage is marked to be 66 encrypted, the algorithms-related information may have no effect to 67 the result package. 68 </p> 69 70 <p> 71 The following values could be part of the provided sequence: 72 </p> 73 <dl> 74 <dt>StartKeyGenerationAlgorithm</dt> 75 <dd> 76 specifies the algorithm that was used to generate 77 the EncryptionKey from the original password; in case 78 the contents should be decrypted, the algorithm might 79 be already known by the object; if a different one is 80 set an exception should be thrown to indicate the 81 error; it should take values from 82 <type scope="com::sun::star::xml:crypto">DigestID</type>. 83 </dd> 84 <dt>EncryptionAlgorithm</dt> 85 <dd> 86 specifies the algorithm that should be used to 87 encrypt/decrypt the contents; in case the contents 88 should be decrypted, the algorithm might be already 89 known by the object; if a different one is set 90 an exception should be thrown to indicate the error; 91 it should take values from 92 <type scope="com::sun::star::xml:crypto">CipherID</type>. 93 </dd> 94 <dt>ChecksumAlgorithm</dt> 95 <dd> 96 specifies the algorithm that was used to generate 97 the checksum of the encrypted data; in case 98 the contents should be decrypted, the algorithm might 99 be already known by the object; if a different one is 100 set an exception should be thrown to indicate the 101 error; it should take values from 102 <type scope="com::sun::star::xml:crypto">DigestID</type>. 103 </dd> 104 </dl> 105 */ 106 void setEncryptionAlgorithms( [in] sequence< ::com::sun::star::beans::NamedValue > aAlgorithms ) 107 raises( ::com::sun::star::lang::IllegalArgumentException ); 108 109 // ----------------------------------------------------------------------- 110 /** allows to get the encryption algorithms of the object. 111 */ 112 sequence< ::com::sun::star::beans::NamedValue > getEncryptionAlgorithms(); 113}; 114 115//============================================================================ 116 117}; }; }; }; 118 119#endif 120 121