~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/algorithm/sha1.cc

  • Committer: Mark Atwood
  • Date: 2011-09-16 17:16:41 UTC
  • mfrom: (2409.3.4 rf)
  • Revision ID: me@mark.atwood.name-20110916171641-ri5n2bd1xsqi5jfb
mergeĀ lp:~olafvdspek/drizzle/refactor7

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "sha1.h"
28
28
#include <string.h>
29
29
 
30
 
namespace drizzled
31
 
{
 
30
namespace drizzled {
32
31
 
33
32
#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
34
33
 
196
195
        }
197
196
}
198
197
 
 
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
 
199
206
} /* namespace drizzled */