Skip to content

Instantly share code, notes, and snippets.

@gleber
Created July 19, 2009 19:40
Show Gist options
  • Select an option

  • Save gleber/150014 to your computer and use it in GitHub Desktop.

Select an option

Save gleber/150014 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import hashlib
for i in xrange(1, 1000000):
m = hashlib.sha1()
m.update("test")
m.digest()
#include "CSHADigest.h"
#include <iostream>
using namespace std;
#include <string.h>
int main(int argc, char* argv[]) {
CSHADigest SHADigest;
char test[] = "test";
for (int i = 0; i < 1000000; i++) {
SHADigest.Start();
SHADigest.ComputeInputBuffer((uByte*)test, strlen(test));
SHADigest.GetByteResult()
SHADigest.Stop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment