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
28//i20156 - new file for xmlsecurity module
29
30/** -- idl definition -- **/
31
32#ifndef __com_sun_star_xml_crypto_xxmlencryptiontemplate_idl_
33#define __com_sun_star_xml_crypto_xxmlencryptiontemplate_idl_
34
35#include <com/sun/star/uno/XInterface.idl>
36#include <com/sun/star/lang/IllegalArgumentException.idl>
37
38#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl>
39#include <com/sun/star/xml/crypto/XXMLSecurityTemplate.idl>
40
41module com { module sun { module star { module xml { module crypto {
42
43/**
44 * Interface of XML encryption template
45 *
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>
51 *
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>
55 *
56 * <p>In some cases, the EncryptedKey need to be clearly pointed out by the
57 * encryption template.</p>
58 *
59 * <p>With the help of encryption context, the encrypter or decrypter specifies
60 * the key from the KeyInfo in the encryption template.</p>
61 *
62 *
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.
65 *
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.
68 *
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.
77 *
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>
82 */
83interface XXMLEncryptionTemplate : XXMLSecurityTemplate
84{
85	/**
86	 * Get the target xml element, i.e. the element to be encrypted
87	 */
88	com::sun::star::xml::wrapper::XXMLElementWrapper getTarget(
89	) ;
90} ;
91
92
93} ; } ; } ; } ; } ;
94
95
96#endif
97
98