~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to sha.cpp

  • Committer: weidai
  • Date: 2003-07-10 04:34:23 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:90
merge in 5.0.4 changes (exclude DES and SHA-2 from DLL),
attempt (failed) to build DLL with GCC

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Both are in the public domain.
5
5
 
6
6
#include "pch.h"
7
 
 
8
 
#ifndef CRYPTOPP_IMPORTS
9
 
 
10
7
#include "sha.h"
11
8
#include "misc.h"
12
9
 
17
14
#define blk0(i) (W[i] = data[i])
18
15
#define blk1(i) (W[i&15] = rotlFixed(W[(i+13)&15]^W[(i+8)&15]^W[(i+2)&15]^W[i&15],1))
19
16
 
 
17
#ifndef CRYPTOPP_IMPORTS
 
18
 
20
19
void SHA::InitState(HashWordType *state)
21
20
{
22
21
        state[0] = 0x67452301L;
79
78
        memset(W, 0, sizeof(W));
80
79
}
81
80
 
 
81
#endif  // #ifndef CRYPTOPP_IMPORTS
 
82
 
82
83
// end of Steve Reid's code
83
84
 
84
85
// *************************************************************
278
279
#endif
279
280
 
280
281
NAMESPACE_END
281
 
 
282
 
#endif