summaryrefslogtreecommitdiff
path: root/libdigidoc/DigiDocEncGen.h
diff options
context:
space:
mode:
authorAndrew Shadura <andrewsh@debian.org>2015-11-01 19:41:28 +0100
committerAndrew Shadura <andrewsh@debian.org>2015-11-01 19:41:28 +0100
commit61c1a106bd81794f48e4cd85bae129f9270279e8 (patch)
tree29ecf644c4a13c2645bd8067e66ae8944dd2daf9 /libdigidoc/DigiDocEncGen.h
libdigidoc (3.10.1.1208-1) unstable; urgency=medium
* Initial upload (Closes: #658300). # imported from the archive
Diffstat (limited to 'libdigidoc/DigiDocEncGen.h')
-rw-r--r--libdigidoc/DigiDocEncGen.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/libdigidoc/DigiDocEncGen.h b/libdigidoc/DigiDocEncGen.h
new file mode 100644
index 0000000..248a4f9
--- /dev/null
+++ b/libdigidoc/DigiDocEncGen.h
@@ -0,0 +1,74 @@
+#ifndef __DIGIDOC_ENC_GEN_H__
+#define __DIGIDOC_ENC_GEN_H__
+//==================================================
+// FILE: DigiDocEncGen.h
+// PROJECT: Digi Doc Encryption
+// DESCRIPTION: DigiDocEnc XML generation
+// AUTHOR: Veiko Sinivee, S|E|B IT Partner Estonia
+//==================================================
+// Copyright (C) AS Sertifitseerimiskeskus
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// This library 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 for more details.
+// GNU Lesser General Public Licence is available at
+// http://www.gnu.org/copyleft/lesser.html
+//==========< HISTORY >=============================
+// 11.10.2004 Veiko Sinivee
+// Creation
+//==================================================
+
+
+#include <libdigidoc/DigiDocDefs.h>
+#include <libdigidoc/DigiDocEnc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ //--------------------------------------------------
+ // Generates XML for <EncryptedData> element
+ // pEncData - encrypted data object [REQUIRED]
+ // pBuf - memory buffer for storing xml [REQUIRED]
+ // returns error code or ERR_OK
+ //--------------------------------------------------
+ EXP_OPTION int dencGenEncryptedData_toXML(DEncEncryptedData* pEncData, DigiDocMemBuf* pBuf);
+
+ //--------------------------------------------------
+ // Writes encrypted data to a file
+ // pEncData - encrypted data object [REQUIRED]
+ // szFileName - name of the file to write the data [REQUIRED]
+ // returns error code or ERR_OK
+ //--------------------------------------------------
+ EXP_OPTION int dencGenEncryptedData_writeToFile(DEncEncryptedData* pEncData, const char* szFileName);
+
+ //--------------------------------------------------
+ // Generates the header of XML for <EncryptedData> element
+ // This contains everything upto the start of base64 encoded cipher data
+ // pEncData - encrypted data object [REQUIRED]
+ // pBuf - memory buffer for storing xml [REQUIRED]
+ // returns error code or ERR_OK
+ //--------------------------------------------------
+ int dencGenEncryptedData_header_toXML(DEncEncryptedData* pEncData, DigiDocMemBuf* pBuf);
+
+ //--------------------------------------------------
+ // Generates the trailer of XML for <EncryptedData> element
+ // These are all the XML constructs following the
+ // base64 encoded cipher data.
+ // pEncData - encrypted data object [REQUIRED]
+ // pBuf - memory buffer for storing xml [REQUIRED]
+ // returns error code or ERR_OK
+ //--------------------------------------------------
+ int dencGenEncryptedData_trailer_toXML(DEncEncryptedData* pEncData, DigiDocMemBuf* pBuf);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif // __DIGIDOC_ENC_GEN_H__
+