Created
August 21, 2019 10:28
-
-
Save theahmadzai/ea50a834fafc1be2fa705e66f8a14438 to your computer and use it in GitHub Desktop.
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int main(int argc, char* argv[]) | |
{ | |
clock_t start, end; | |
double cpu_time_used; | |
start = clock(); | |
char _m[4] = {'J','A','V'}; | |
char _k[4] = {'B','D','N'}; | |
int m = (int)((int*)m); | |
int k = (int)((int*)k); | |
int c = m ^ k; | |
for(int i = 0x1l; i < 0x7FFFFFFFl; i += 0x1) | |
{ | |
if((i ^ c) == m) | |
{ | |
int b = i ^ c; | |
printf("MATCHED\n"); | |
for(int j = 0; j<4; j++) | |
{ | |
printf("%d", (int)(b)); | |
b = b >> 8; | |
} | |
break; | |
} | |
} | |
end = clock(); | |
cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC; | |
printf("%f ms", cpu_time_used); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment