Created
July 19, 2009 19:40
-
-
Save gleber/150014 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import hashlib | |
| for i in xrange(1, 1000000): | |
| m = hashlib.sha1() | |
| m.update("test") | |
| m.digest() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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