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
24//i20156 - new file for xmlsecurity module
25
26/** -- idl definition -- **/
27
28#ifndef __com_sun_star_xml_crypto_xxmlencryption_idl_
29#define __com_sun_star_xml_crypto_xxmlencryption_idl_
30
31#include <com/sun/star/uno/XInterface.idl>
32#include <com/sun/star/uno/Exception.idl>
33#include <com/sun/star/uno/SecurityException.idl>
34
35#include <com/sun/star/xml/crypto/XXMLEncryptionTemplate.idl>
36#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl>
37#include <com/sun/star/xml/crypto/XXMLSecurityContext.idl>
38#include <com/sun/star/xml/crypto/XMLEncryptionException.idl>
39
40
41module com { module sun { module star { module xml { module crypto {
42
43/**
44 * Interface of XML encryption
45 *
46 * <p>This interface represents a xml encrypter or decrypter.</p>
47 *
48 * <p>The encrypter or decrypter concrete a key by retrieve security context
49 * and encryption template.</p>
50 *
51 * <p>In some cases, the encrypter or decrypter can dertermine and locate the
52 * EncrytedKey from the encryption template by dereference the RetrievalMethod
53 * inside EncryptedData.</p>
54 *
55 * <p>In some cases, the EncryptedKey need to be clearly pointed out by the
56 * encryption template.</p>
57 */
58interface XXMLEncryption : com::sun::star::uno::XInterface
59{
60	/**
61	 * Perform encryption in the environment of encryption template and context.
62	 */
63	com::sun::star::xml::crypto::XXMLEncryptionTemplate encrypt(
64		[in] com::sun::star::xml::crypto::XXMLEncryptionTemplate aTemplate ,
65		[in] com::sun::star::xml::crypto::XSecurityEnvironment aEnvironment
66	) raises( com::sun::star::xml::crypto::XMLEncryptionException ,
67		com::sun::star::uno::SecurityException ) ;
68
69	/**
70	 * Perform decryption in the environment of encrytpion template and context.
71	 */
72	com::sun::star::xml::crypto::XXMLEncryptionTemplate decrypt(
73		[in] com::sun::star::xml::crypto::XXMLEncryptionTemplate aTemplate ,
74		[in] com::sun::star::xml::crypto::XXMLSecurityContext aContext
75	) raises( com::sun::star::xml::crypto::XMLEncryptionException ,
76		com::sun::star::uno::SecurityException ) ;
77} ;
78
79} ; } ; } ; } ; } ;
80
81
82#endif
83
84