Created
April 30, 2012 23:39
-
-
Save kristopherjohnson/2563667 to your computer and use it in GitHub Desktop.
Generate SHA1 hash for a string
This file contains 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
#import <CommonCrypto/CommonDigest.h> | |
// ... | |
const char *unlockCode = "99999999"; | |
size_t unlockCodeSize = strlen(unlockCode); | |
unsigned char hashBytes[CC_SHA1_DIGEST_LENGTH]; | |
CC_SHA1(unlockCode, unlockCodeSize, hashBytes); | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment