summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-11-09 08:35:42 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-11-18 11:54:08 +0100
commitd53922c3511a70567f43d17480514d77e81c168c (patch)
tree85ffee23f2b8e74ecda680d5a7b0863ec22a9032
parentbc9b86940a707e9e2e1076f2954f38075398b5d7 (diff)
Backport reading AES-encrypted ODF 1.2 documents (as genereated by LibO 3.5).
This backports the reading half of CWS mav60 plus <http://cgit.freedesktop.org/ libreoffice/core/commit/?id=2d775f593abd9bc487ccc60f06aa5a3ca9632056> "Produce correct sha256 uri, consume correct uri and original spec typo." It spans the repos components, libs-core, libs-gui, and ure.
-rw-r--r--offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl118
-rw-r--r--offapi/com/sun/star/embed/makefile.mk1
-rw-r--r--offapi/com/sun/star/xml/crypto/CipherID.idl59
-rw-r--r--offapi/com/sun/star/xml/crypto/DigestID.idl71
-rw-r--r--offapi/com/sun/star/xml/crypto/SEInitializer.idl4
-rw-r--r--offapi/com/sun/star/xml/crypto/XCipherContext.idl88
-rw-r--r--offapi/com/sun/star/xml/crypto/XCipherContextSupplier.idl91
-rw-r--r--offapi/com/sun/star/xml/crypto/XDigestContext.idl73
-rw-r--r--offapi/com/sun/star/xml/crypto/XDigestContextSupplier.idl82
-rw-r--r--offapi/com/sun/star/xml/crypto/makefile.mk6
10 files changed, 593 insertions, 0 deletions
diff --git a/offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl b/offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl
new file mode 100644
index 000000000..91f119999
--- /dev/null
+++ b/offapi/com/sun/star/embed/XEncryptionProtectedStorage.idl
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_embed_XEncryptionProtectedStorage_idl__
+#define __com_sun_star_embed_XEncryptionProtectedStorage_idl__
+
+#ifndef __com_sun_star_embed_XEncryptionProtectedSource2_idl__
+#include <com/sun/star/embed/XEncryptionProtectedSource2.idl>
+#endif
+
+#ifndef __com_sun_star_beans_NamedValue_idl__
+#include <com/sun/star/beans/NamedValue.idl>
+#endif
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+#ifndef __com_sun_star_xml_crypto_DigestID_idl__
+#include <com/sun/star/xml/crypto/DigestID.idl>
+#endif
+
+#ifndef __com_sun_star_xml_crypto_CipherID_idl__
+#include <com/sun/star/xml/crypto/CipherID.idl>
+#endif
+
+//============================================================================
+
+module com { module sun { module star { module embed {
+
+//============================================================================
+/** This interface allows to set a password for an object.
+
+ This unpublished interface was introduced into a micro update of
+ LibreOffice 3.4; it is unclear in what exact form it will be included in
+ LibreOffice 3.5. A corresponding OOo interface (which is also unpublished)
+ is scheduled for inclusion into OOo 3.4 and contains an additional
+ getEncryptionAlgorithms method.
+ */
+interface XEncryptionProtectedStorage: XEncryptionProtectedSource2
+{
+ // -----------------------------------------------------------------------
+ /** allows to set the encryption algorithms for the object.
+ <p>
+ The algorithms will of course be used only for streams that have been
+ marked to be encrypted. If no stream in the storage is marked to be
+ encrypted, the algorithms-related information may have no effect to
+ the result package.
+ </p>
+
+ <p>
+ The following values could be part of the provided sequence:
+ </p>
+ <dl>
+ <dt>StartKeyGenerationAlgorithm</dt>
+ <dd>
+ specifies the algorithm that was used to generate
+ the EncryptionKey from the original password; in case
+ the contents should be decrypted, the algorithm might
+ be already known by the object; if a different one is
+ set an exception should be thrown to indicate the
+ error; it should take values from
+ <type scope="com::sun::star::xml:crypto">DigestID</type>.
+ </dd>
+ <dt>EncryptionAlgorithm</dt>
+ <dd>
+ specifies the algorithm that should be used to
+ encrypt/decrypt the contents; in case the contents
+ should be decrypted, the algorithm might be already
+ known by the object; if a different one is set
+ an exception should be thrown to indicate the error;
+ it should take values from
+ <type scope="com::sun::star::xml:crypto">CipherID</type>.
+ </dd>
+ <dt>ChecksumAlgorithm</dt>
+ <dd>
+ specifies the algorithm that was used to generate
+ the checksum of the encrypted data; in case
+ the contents should be decrypted, the algorithm might
+ be already known by the object; if a different one is
+ set an exception should be thrown to indicate the
+ error; it should take values from
+ <type scope="com::sun::star::xml:crypto">DigestID</type>.
+ </dd>
+ </dl>
+ */
+ void setEncryptionAlgorithms( [in] sequence< ::com::sun::star::beans::NamedValue > aAlgorithms )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+};
+
+//============================================================================
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/embed/makefile.mk b/offapi/com/sun/star/embed/makefile.mk
index 8ee156af4..c142086cd 100644
--- a/offapi/com/sun/star/embed/makefile.mk
+++ b/offapi/com/sun/star/embed/makefile.mk
@@ -78,6 +78,7 @@ IDLFILES=\
XLinkFactory.idl\
XEncryptionProtectedSource.idl\
XEncryptionProtectedSource2.idl\
+ XEncryptionProtectedStorage.idl\
XInplaceClient.idl\
XInsertObjectDialog.idl\
XWindowSupplier.idl\
diff --git a/offapi/com/sun/star/xml/crypto/CipherID.idl b/offapi/com/sun/star/xml/crypto/CipherID.idl
new file mode 100644
index 000000000..a59c03418
--- /dev/null
+++ b/offapi/com/sun/star/xml/crypto/CipherID.idl
@@ -0,0 +1,59 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_xml_crypto_CipherID_idl__
+#define __com_sun_star_xml_crypto_CipherID_idl__
+
+
+//============================================================================
+
+module com { module sun { module star { module xml { module crypto {
+
+//============================================================================
+/** The constant set contains identifiers of supported cipher-creation
+ algorithms.
+
+ @see <type>XCipherContextSupplier</type>
+ @since OOo 3.4
+*/
+constants CipherID
+{
+ //------------------------------------------------------------------------
+ /** identifier of AES algorithm in CBC mode with W3C padding
+ */
+ const long AES_CBC_W3C_PADDING = 1;
+
+ //------------------------------------------------------------------------
+ /** identifier of the Blowfish algorithm in 8-bit CFB mode
+ */
+ const long BLOWFISH_CFB_8 = 2;
+};
+
+//============================================================================
+
+}; }; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/xml/crypto/DigestID.idl b/offapi/com/sun/star/xml/crypto/DigestID.idl
new file mode 100644
index 000000000..bd2c61cb3
--- /dev/null
+++ b/offapi/com/sun/star/xml/crypto/DigestID.idl
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_xml_crypto_DigestID_idl__
+#define __com_sun_star_xml_crypto_DigestID_idl__
+
+
+//============================================================================
+
+module com { module sun { module star { module xml { module crypto {
+
+//============================================================================
+/** The constant set contains identifiers of supported digest-creation
+ algorithms.
+
+ @see <type>XDigestContextSupplier</type>
+ @since OOo 3.4
+*/
+constants DigestID
+{
+ //------------------------------------------------------------------------
+ /** identifier of SHA-1 algorithm
+ */
+ const long SHA1 = 1;
+
+ //------------------------------------------------------------------------
+ /** identifier of SHA-256 algorithm
+ */
+ const long SHA256 = 2;
+
+ //------------------------------------------------------------------------
+ /** identifier of SHA-1 algorithm that is applied to the first kilobyte
+ of data.
+ */
+ const long SHA1_1K = 3;
+
+ //------------------------------------------------------------------------
+ /** identifier of SHA-256 algorithm that is applied to the first kilobyte
+ of data.
+ */
+ const long SHA256_1K = 4;
+};
+
+//============================================================================
+
+}; }; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/xml/crypto/SEInitializer.idl b/offapi/com/sun/star/xml/crypto/SEInitializer.idl
index beec5efa9..5a9ff7d0e 100644
--- a/offapi/com/sun/star/xml/crypto/SEInitializer.idl
+++ b/offapi/com/sun/star/xml/crypto/SEInitializer.idl
@@ -36,6 +36,8 @@
#include <com/sun/star/uno/Exception.idl>
#include <com/sun/star/xml/crypto/XSEInitializer.idl>
+#include <com/sun/star/xml/crypto/XDigestContextSupplier.idl>
+#include <com/sun/star/xml/crypto/XCipherContextSupplier.idl>
#include <com/sun/star/lang/XServiceInfo.idl>
@@ -46,6 +48,8 @@ module com { module sun { module star { module xml { module crypto {
*/
service SEInitializer {
interface com::sun::star::xml::crypto::XSEInitializer ;
+ interface ::com::sun::star::xml::crypto::XDigestContextSupplier;
+ interface ::com::sun::star::xml::crypto::XCipherContextSupplier;
interface com::sun::star::lang::XServiceInfo ;
};
diff --git a/offapi/com/sun/star/xml/crypto/XCipherContext.idl b/offapi/com/sun/star/xml/crypto/XCipherContext.idl
new file mode 100644
index 000000000..fb8413957
--- /dev/null
+++ b/offapi/com/sun/star/xml/crypto/XCipherContext.idl
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_xml_crypto_xciphercontext_idl_
+#define __com_sun_star_xml_crypto_xciphercontext_idl_
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+#ifndef __com_sun_star_lang_DisposedException_idl__
+#include <com/sun/star/lang/DisposedException.idl>
+#endif
+
+//============================================================================
+
+ module com { module sun { module star { module xml { module crypto {
+
+//============================================================================
+/** This interface allows to encrypt/decrypt data using the cipher context.
+ <p>
+ The algorithm as well as encryption data are specified on object creation.
+ </p>
+
+ @see <type>XCipherContextSupplier</type>
+ @since OOo 3.4
+ */
+interface XCipherContext : com::sun::star::uno::XInterface
+{
+ //------------------------------------------------------------------------
+ /** encrypts/decrypts the data using the cipher.
+ <p>
+ Please have in mind, the cipher object state might depend from the
+ already encrypted/decrypted data ( it depends from the used
+ algorithm ).
+ </p>
+
+ <p>
+ Whether the object does encryption or decryption is specified by
+ creation of the object.
+ </p>
+
+ @param aData
+ data that should be encrypted/decrypted
+ */
+ sequence<byte> convertWithCipherContext( [in] sequence< byte > aData )
+ raises( ::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::lang::DisposedException );
+
+ //------------------------------------------------------------------------
+ /** finalizes cipher and disposes context.
+ */
+ sequence<byte> finalizeCipherContextAndDispose()
+ raises( ::com::sun::star::lang::DisposedException );
+};
+
+//============================================================================
+
+}; }; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/xml/crypto/XCipherContextSupplier.idl b/offapi/com/sun/star/xml/crypto/XCipherContextSupplier.idl
new file mode 100644
index 000000000..115cf7b0e
--- /dev/null
+++ b/offapi/com/sun/star/xml/crypto/XCipherContextSupplier.idl
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_xml_crypto_xciphercontextsupplier_idl_
+#define __com_sun_star_xml_crypto_xciphercontextsupplier_idl_
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_beans_NamedValue_idl__
+#include <com/sun/star/beans/NamedValue.idl>
+#endif
+
+#ifndef __com_sun_star_xml_crypto_XCipherContext_idl__
+#include <com/sun/star/xml/crypto/XCipherContext.idl>
+#endif
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+//============================================================================
+
+ module com { module sun { module star { module xml { module crypto {
+
+//============================================================================
+/** This interface allows to get an object that allows to encrypt/decrypt data
+ using the specified algorithm.
+
+ @since OOo 3.4
+ */
+interface XCipherContextSupplier : com::sun::star::uno::XInterface
+{
+ //------------------------------------------------------------------------
+ /** returns an object that allows to encrypt/decrypt data.
+
+ @param nCipherID
+ the internal ID specifying the algorithm,
+ should take value from <type>CipherID</type>
+
+ @param aKey
+ the key that should be used for the encryption
+
+ @param aInitializationVector
+ the initialization vector that should be used for the encryption
+
+ @param bEncryption
+ whether an encryption or decryption cipher should be created
+ <TRUE/> - Encryption
+ <FALSE/> - Decryption
+
+ @param aParams
+ optional parameters that could be used to initialize the cipher,
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ one of provided arguments is illegal
+ */
+
+ XCipherContext getCipherContext( [in] long nCipherID, [in] sequence< byte > aKey, [in] sequence< byte > aInitializationVector, [in] boolean bEncryption, [in] sequence< ::com::sun::star::beans::NamedValue > aParams )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+};
+
+//============================================================================
+
+}; }; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/xml/crypto/XDigestContext.idl b/offapi/com/sun/star/xml/crypto/XDigestContext.idl
new file mode 100644
index 000000000..36c1d99c4
--- /dev/null
+++ b/offapi/com/sun/star/xml/crypto/XDigestContext.idl
@@ -0,0 +1,73 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_xml_crypto_xdigestcontext_idl_
+#define __com_sun_star_xml_crypto_xdigestcontext_idl_
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_lang_DisposedException_idl__
+#include <com/sun/star/lang/DisposedException.idl>
+#endif
+
+//============================================================================
+
+ module com { module sun { module star { module xml { module crypto {
+
+//============================================================================
+/** This interface allows to generate the digest.
+ <p>
+ The algorithm to generate the digest is specified on object creation.
+ </p>
+
+ @see <type>XDigestContextSupplier</type>
+ @since OOo 3.4
+ */
+interface XDigestContext : com::sun::star::uno::XInterface
+{
+ //------------------------------------------------------------------------
+ /** update the digest with the given data.
+
+ @param aData
+ data that should be used to update the digest
+ */
+ void updateDigest( [in] sequence< byte > aData )
+ raises( ::com::sun::star::lang::DisposedException );
+
+ //------------------------------------------------------------------------
+ /** finalizes digest and disposes context.
+ */
+ sequence<byte> finalizeDigestAndDispose()
+ raises( ::com::sun::star::lang::DisposedException );
+};
+
+//============================================================================
+
+}; }; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/xml/crypto/XDigestContextSupplier.idl b/offapi/com/sun/star/xml/crypto/XDigestContextSupplier.idl
new file mode 100644
index 000000000..edb77a5e6
--- /dev/null
+++ b/offapi/com/sun/star/xml/crypto/XDigestContextSupplier.idl
@@ -0,0 +1,82 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_xml_crypto_xdigestcontextsupplier_idl_
+#define __com_sun_star_xml_crypto_xdigestcontextsupplier_idl_
+
+#ifndef __com_sun_star_uno_XInterface_idl__
+#include <com/sun/star/uno/XInterface.idl>
+#endif
+
+#ifndef __com_sun_star_beans_NamedValue_idl__
+#include <com/sun/star/beans/NamedValue.idl>
+#endif
+
+#ifndef __com_sun_star_xml_crypto_XDigestContext_idl__
+#include <com/sun/star/xml/crypto/XDigestContext.idl>
+#endif
+
+#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
+#include <com/sun/star/lang/IllegalArgumentException.idl>
+#endif
+
+//============================================================================
+
+ module com { module sun { module star { module xml { module crypto {
+
+//============================================================================
+/** This interface allows to get an object to generate a digest of a specified
+ format.
+
+ @since OOo 3.4
+ */
+interface XDigestContextSupplier : com::sun::star::uno::XInterface
+{
+ //------------------------------------------------------------------------
+ /** returns an object that allows to generate the specified digest.
+
+ @param nDigestID
+ the internal ID specifying the algorithm,
+ should take value from <type>DigestID</type>
+
+ @param aParams
+ optional parameters that could be used to initialize the digest,
+ for example, it could contain a key and etc.
+
+ @throws ::com::sun::star::lang::IllegalArgumentException
+ one of provided arguments is illegal
+ */
+ XDigestContext getDigestContext(
+ [in] long nDigestID,
+ [in] sequence< ::com::sun::star::beans::NamedValue > aParams )
+ raises( ::com::sun::star::lang::IllegalArgumentException );
+};
+
+//============================================================================
+
+}; }; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/xml/crypto/makefile.mk b/offapi/com/sun/star/xml/crypto/makefile.mk
index 4aa3957ac..c03b2a76d 100644
--- a/offapi/com/sun/star/xml/crypto/makefile.mk
+++ b/offapi/com/sun/star/xml/crypto/makefile.mk
@@ -58,6 +58,12 @@ IDLFILES=\
XMLSignatureException.idl \
XMLEncryptionException.idl \
XUriBinding.idl \
+ CipherID.idl \
+ DigestID.idl \
+ XCipherContext.idl \
+ XCipherContextSupplier.idl \
+ XDigestContext.idl \
+ XDigestContextSupplier.idl \
SecurityOperationStatus.idl
# ------------------------------------------------------------------