~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/sha2.h

  • Committer: Brian Aker
  • Date: 2008-07-02 15:36:57 UTC
  • mfrom: (40.1.1 drizzle)
  • Revision ID: brian@tangent.org-20080702153657-nvx7sm2goic04ite
Mark's merge to drop SSL defines 

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include <my_global.h>
20
20
 
21
 
#if defined(HAVE_YASSL) || defined(HAVE_OPENSSL)
22
 
 
23
 
#  ifdef HAVE_STDDEF_H
24
 
#    include <stddef.h>
25
 
#  endif
26
 
 
27
 
#  ifndef HAVE_YASSL
28
 
#    include <openssl/sha.h>
29
 
 
30
 
#  else
31
 
 
32
 
#include "../extra/yassl/taocrypt/include/sha.hpp"
33
 
 
34
 
#    ifdef __cplusplus
35
 
extern "C" {
36
 
#    endif
37
 
 
38
 
#ifndef SHA512_DIGEST_LENGTH
39
 
#define SHA512_DIGEST_LENGTH TaoCrypt::SHA512::DIGEST_SIZE
40
 
#endif
41
 
 
42
 
#ifndef SHA384_DIGEST_LENGTH
43
 
#define SHA384_DIGEST_LENGTH TaoCrypt::SHA384::DIGEST_SIZE
44
 
#endif
45
 
 
46
 
#ifndef SHA256_DIGEST_LENGTH
47
 
#define SHA256_DIGEST_LENGTH TaoCrypt::SHA256::DIGEST_SIZE
48
 
#endif
49
 
 
50
 
#ifndef SHA224_DIGEST_LENGTH
51
 
#define SHA224_DIGEST_LENGTH TaoCrypt::SHA224::DIGEST_SIZE
52
 
#endif
53
 
 
54
 
#define GEN_YASSL_SHA2_BRIDGE(size) \
55
 
unsigned char* SHA##size(const unsigned char *input_ptr, size_t input_length, \
56
 
               char unsigned *output_ptr);
57
 
 
58
 
GEN_YASSL_SHA2_BRIDGE(512);
59
 
GEN_YASSL_SHA2_BRIDGE(384);
60
 
GEN_YASSL_SHA2_BRIDGE(256);
61
 
GEN_YASSL_SHA2_BRIDGE(224);
62
 
 
63
 
#undef GEN_YASSL_SHA2_BRIDGE
64
 
 
65
 
#    ifdef __cplusplus
66
 
}
67
 
#    endif
68
 
 
69
 
#  endif /* HAVE_YASSL */
70
 
 
71
 
#endif /* HAVE_OPENSSL || HAVE_YASSL */
72
21
#endif /* included_sha2_h */