1cc385c9fSAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3cc385c9fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4cc385c9fSAndrew Rist * or more contributor license agreements.  See the NOTICE file
5cc385c9fSAndrew Rist * distributed with this work for additional information
6cc385c9fSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7cc385c9fSAndrew Rist * to you under the Apache License, Version 2.0 (the
8cc385c9fSAndrew Rist * "License"); you may not use this file except in compliance
9cc385c9fSAndrew Rist * with the License.  You may obtain a copy of the License at
10cc385c9fSAndrew Rist *
11cc385c9fSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cc385c9fSAndrew Rist *
13cc385c9fSAndrew Rist * Unless required by applicable law or agreed to in writing,
14cc385c9fSAndrew Rist * software distributed under the License is distributed on an
15cc385c9fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16cc385c9fSAndrew Rist * KIND, either express or implied.  See the License for the
17cc385c9fSAndrew Rist * specific language governing permissions and limitations
18cc385c9fSAndrew Rist * under the License.
19cc385c9fSAndrew Rist *
20cc385c9fSAndrew Rist *************************************************************/
21cc385c9fSAndrew Rist
22cc385c9fSAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_xml_crypto_xciphercontext_idl_
24cdf0e10cSrcweir#define __com_sun_star_xml_crypto_xciphercontext_idl_
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
31cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_lang_DisposedException_idl__
35cdf0e10cSrcweir#include <com/sun/star/lang/DisposedException.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir//============================================================================
39cdf0e10cSrcweir
40cdf0e10cSrcweir module com {  module sun {  module star {  module xml { module crypto {
41cdf0e10cSrcweir
42cdf0e10cSrcweir//============================================================================
43cdf0e10cSrcweir/** This interface allows to encrypt/decrypt data using the cipher context.
44cdf0e10cSrcweir    <p>
45cdf0e10cSrcweir    The algorithm as well as encryption data are specified on object creation.
46cdf0e10cSrcweir    </p>
47cdf0e10cSrcweir
48cdf0e10cSrcweir    @see <type>XCipherContextSupplier</type>
49*34c958abSJürgen Schmidt    @since OpenOffice 3.4
50cdf0e10cSrcweir */
51cdf0e10cSrcweirinterface XCipherContext : com::sun::star::uno::XInterface
52cdf0e10cSrcweir{
53cdf0e10cSrcweir    //------------------------------------------------------------------------
54cdf0e10cSrcweir    /** encrypts/decrypts the data using the cipher.
55cdf0e10cSrcweir        <p>
56cdf0e10cSrcweir        Please have in mind, the cipher object state might depend from the
57cdf0e10cSrcweir        already encrypted/decrypted data ( it depends from the used
58cdf0e10cSrcweir        algorithm ).
59cdf0e10cSrcweir        </p>
60cdf0e10cSrcweir
61cdf0e10cSrcweir        <p>
62cdf0e10cSrcweir        Whether the object does encryption or decryption is specified by
63cdf0e10cSrcweir        creation of the object.
64cdf0e10cSrcweir        </p>
65cdf0e10cSrcweir
66cdf0e10cSrcweir        @param aData
67cdf0e10cSrcweir            data that should be encrypted/decrypted
68cdf0e10cSrcweir     */
69cdf0e10cSrcweir    sequence<byte> convertWithCipherContext( [in] sequence< byte > aData )
70cdf0e10cSrcweir        raises( ::com::sun::star::lang::IllegalArgumentException,
71cdf0e10cSrcweir                ::com::sun::star::lang::DisposedException );
72cdf0e10cSrcweir
73cdf0e10cSrcweir    //------------------------------------------------------------------------
74cdf0e10cSrcweir    /** finalizes cipher and disposes context.
75cdf0e10cSrcweir     */
76cdf0e10cSrcweir    sequence<byte> finalizeCipherContextAndDispose()
77cdf0e10cSrcweir        raises( ::com::sun::star::lang::DisposedException );
78cdf0e10cSrcweir};
79cdf0e10cSrcweir
80cdf0e10cSrcweir//============================================================================
81cdf0e10cSrcweir
82cdf0e10cSrcweir}; }; }; }; };
83cdf0e10cSrcweir
84cdf0e10cSrcweir#endif
85cdf0e10cSrcweir
86