summaryrefslogtreecommitdiffstats
path: root/src/uscxml/util/SHA1.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-11-16 16:45:34 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-11-16 16:45:34 (GMT)
commita5b2c2081329958710a59107854349f5b6a14bcb (patch)
treecd4724968c4eb865db853450ebab19094ca6d6dc /src/uscxml/util/SHA1.h
parent22ddb37efb48c484e022fef5516491ad69608397 (diff)
downloaduscxml-a5b2c2081329958710a59107854349f5b6a14bcb.zip
uscxml-a5b2c2081329958710a59107854349f5b6a14bcb.tar.gz
uscxml-a5b2c2081329958710a59107854349f5b6a14bcb.tar.bz2
Builds on windows again
Diffstat (limited to 'src/uscxml/util/SHA1.h')
-rw-r--r--[-rwxr-xr-x]src/uscxml/util/SHA1.h67
1 files changed, 38 insertions, 29 deletions
diff --git a/src/uscxml/util/SHA1.h b/src/uscxml/util/SHA1.h
index 2b1f466..f9baa5b 100755..100644
--- a/src/uscxml/util/SHA1.h
+++ b/src/uscxml/util/SHA1.h
@@ -5,13 +5,13 @@
Freeware Public License (FPL)
This software is licensed as "freeware." Permission to distribute
- this software in source and binary forms, including incorporation
- into other products, is hereby granted without a fee. THIS SOFTWARE
- IS PROVIDED 'AS IS' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR SHALL NOT BE HELD
- LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE, EITHER
- DIRECTLY OR INDIRECTLY, INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA
+ this software in source and binary forms, including incorporation
+ into other products, is hereby granted without a fee. THIS SOFTWARE
+ IS PROVIDED 'AS IS' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR SHALL NOT BE HELD
+ LIABLE FOR ANY DAMAGES RESULTING FROM THE USE OF THIS SOFTWARE, EITHER
+ DIRECTLY OR INDIRECTLY, INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA
OR DATA BEING RENDERED INACCURATE.
*/
@@ -41,36 +41,45 @@
#ifndef _SHA1_H_
#define _SHA1_H_
+#if defined(_WIN32) && !defined(USCXML_STATIC)
+# ifdef USCXML_EXPORT
+# define USCXML_API __declspec(dllexport)
+# else
+# define USCXML_API __declspec(dllimport)
+# endif
+#else
+# define USCXML_API
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
-/*
- * This structure will hold context information for the hashing
- * operation
- */
-typedef struct SHA1Context
-{
- unsigned Message_Digest[5]; /* Message Digest (output) */
+ /*
+ * This structure will hold context information for the hashing
+ * operation
+ */
+ typedef struct SHA1Context {
+ unsigned Message_Digest[5]; /* Message Digest (output) */
- unsigned Length_Low; /* Message length in bits */
- unsigned Length_High; /* Message length in bits */
+ unsigned Length_Low; /* Message length in bits */
+ unsigned Length_High; /* Message length in bits */
- unsigned char Message_Block[64]; /* 512-bit message blocks */
- int Message_Block_Index; /* Index into message block array */
+ unsigned char Message_Block[64]; /* 512-bit message blocks */
+ int Message_Block_Index; /* Index into message block array */
- int Computed; /* Is the digest computed? */
- int Corrupted; /* Is the message digest corruped? */
-} SHA1Context;
+ int Computed; /* Is the digest computed? */
+ int Corrupted; /* Is the message digest corruped? */
+ } SHA1Context;
-/*
- * Function Prototypes
- */
-void SHA1Reset(SHA1Context *);
-int SHA1Result(SHA1Context *);
-void SHA1Input(SHA1Context *,
- const unsigned char *,
- unsigned);
+ /*
+ * Function Prototypes
+ */
+ USCXML_API void SHA1Reset(SHA1Context *);
+ USCXML_API int SHA1Result(SHA1Context *);
+ USCXML_API void SHA1Input(SHA1Context *,
+ const unsigned char *,
+ unsigned);
#ifdef __cplusplus
}