~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/algorithm/sha1.cc

Merge Monty - Updates to pandora-build to support features of gcc 4.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 *   34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
24
24
 */
25
25
 
26
 
#include <config.h>
 
26
#include "config.h"
27
27
#include "sha1.h"
28
28
#include <string.h>
29
29
 
30
 
namespace drizzled {
 
30
namespace drizzled
 
31
{
31
32
 
32
33
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
33
34
 
195
196
        }
196
197
}
197
198
 
198
 
void do_sha1(data_ref in, uint8_t out[SHA1_DIGEST_LENGTH])
199
 
{
200
 
  SHA1_CTX ctx;
201
 
  SHA1Init(&ctx);
202
 
  SHA1Update(&ctx, in.data(), in.size());
203
 
  SHA1Final(out, &ctx);
204
 
}
205
 
 
206
199
} /* namespace drizzled */