Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / xml / crypto / XXMLEncryptionTemplate.idl
blob2fe6d1cf2898be12f57a655d7477fb03bea6e02a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XXMLEncryptionTemplate.idl,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 //i20156 - new file for xmlsecurity module
33 /** -- idl definition -- **/
35 #ifndef __com_sun_star_xml_crypto_xxmlencryptiontemplate_idl_
36 #define __com_sun_star_xml_crypto_xxmlencryptiontemplate_idl_
38 #include <com/sun/star/uno/XInterface.idl>
39 #include <com/sun/star/lang/IllegalArgumentException.idl>
41 #include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl>
42 #include <com/sun/star/xml/crypto/XXMLSecurityTemplate.idl>
44 module com { module sun { module star { module xml { module crypto {
46 /**
47 * Interface of XML encryption template
49 * <p>This interface represents a encryption template, which is the same as the
50 * desired xml encryption element[ EncryptedType ] but some of the nodes may be
51 * empty. The empty entities include CipherValue, which is a subset of
52 * EncryptedData or EncryptedKey. Empty entities are not allowed in a encryption
53 * template when performing decryption.</p>
55 * <p>In some cases, the encrypter or decrypter can dertermine and locate the
56 * EncrytedKey from the encryption template by dereference the RetrievalMethod
57 * inside EncryptedData.</p>
59 * <p>In some cases, the EncryptedKey need to be clearly pointed out by the
60 * encryption template.</p>
62 * <p>With the help of encryption context, the encrypter or decrypter specifies
63 * the key from the KeyInfo in the encryption template.</p>
66 * <p>It isn't a good method to set the EncryptedKey here. In general, there is
67 * a RetrievalMethod in EncryptedData by which we can get the EncryptedKey.
69 * And some times, in the low level, it is hard to determine what the key is
70 * except that the high level application tell the mechanism and parameters.
72 * So I think it will be more simple that the application set the encrypted key
73 * information. In this case, the application only need to know the xml schema
74 * or DTD and the encryption device. If so, the high level application takes the
75 * action of build the EncryptedKey template and references it in the element of
76 * EncryptedData. And in this case, the calling to set up EncryptedKey template
77 * and target is not necessary, because the encrypter or decrypter can determine
78 * and locate the EncrypedKet from the encryption template of EncryptedData by
79 * dereference the RetrievalMethod.
81 * In some situation, the high level applications do not want to know anything
82 * about crypto devices( May be he must, because the lower level do not know
83 * what the key is ). If it gives the key value, it can get EncryptedKey by
84 * setting the key template and key value target.</p>
86 interface XXMLEncryptionTemplate : XXMLSecurityTemplate
88 /**
89 * Get the target xml element, i.e. the element to be encrypted
91 com::sun::star::xml::wrapper::XXMLElementWrapper getTarget(
92 ) ;
93 } ;
96 } ; } ; } ; } ; } ;
99 #endif