1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 //i20156 - new file for xmlsecurity module
30 /** -- idl definition -- **/
32 #ifndef __com_sun_star_xml_crypto_xxmlencryptiontemplate_idl_
33 #define __com_sun_star_xml_crypto_xxmlencryptiontemplate_idl_
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
36 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
38 #include
<com
/sun
/star
/xml
/wrapper
/XXMLElementWrapper.idl
>
39 #include
<com
/sun
/star
/xml
/crypto
/XXMLSecurityTemplate.idl
>
41 module com
{ module sun
{ module star
{ module xml
{ module crypto
{
44 * Interface of XML encryption template
46 * <p>This interface represents a encryption template, which is the same as the
47 * desired xml encryption element[ EncryptedType ] but some of the nodes may be
48 * empty. The empty entities include CipherValue, which is a subset of
49 * EncryptedData or EncryptedKey. Empty entities are not allowed in a encryption
50 * template when performing decryption.</p>
52 * <p>In some cases, the encrypter or decrypter can dertermine and locate the
53 * EncrytedKey from the encryption template by dereference the RetrievalMethod
54 * inside EncryptedData.</p>
56 * <p>In some cases, the EncryptedKey need to be clearly pointed out by the
57 * encryption template.</p>
59 * <p>With the help of encryption context, the encrypter or decrypter specifies
60 * the key from the KeyInfo in the encryption template.</p>
63 * <p>It isn't a good method to set the EncryptedKey here. In general, there is
64 * a RetrievalMethod in EncryptedData by which we can get the EncryptedKey.
66 * And some times, in the low level, it is hard to determine what the key is
67 * except that the high level application tell the mechanism and parameters.
69 * So I think it will be more simple that the application set the encrypted key
70 * information. In this case, the application only need to know the xml schema
71 * or DTD and the encryption device. If so, the high level application takes the
72 * action of build the EncryptedKey template and references it in the element of
73 * EncryptedData. And in this case, the calling to set up EncryptedKey template
74 * and target is not necessary, because the encrypter or decrypter can determine
75 * and locate the EncrypedKet from the encryption template of EncryptedData by
76 * dereference the RetrievalMethod.
78 * In some situation, the high level applications do not want to know anything
79 * about crypto devices( May be he must, because the lower level do not know
80 * what the key is ). If it gives the key value, it can get EncryptedKey by
81 * setting the key template and key value target.</p>
83 interface XXMLEncryptionTemplate
: XXMLSecurityTemplate
86 * Get the target xml element, i.e. the element to be encrypted
88 com
::sun
::star
::xml
::wrapper
::XXMLElementWrapper getTarget
(