33 lines
670 B
C
33 lines
670 B
C
#include <openssl/md5.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int main(){
|
|
printf("\nWEST");
|
|
const char *input_string = "yzbqklnj";
|
|
unsigned char output_digest[MD5_DIGEST_LENGTH];
|
|
unsigned long long int iteration_number = 0;
|
|
|
|
//creating empty md5 context
|
|
MD5_CTX context;
|
|
|
|
zeroes = {0,0,0,0,0}
|
|
//comparing first 5 digits of output
|
|
while (memcmp(charx, zeros, 5) !=0){
|
|
if(!MD5_Init(&context)){
|
|
fprintf(stderr,"Error MD5init failed");
|
|
return 1;
|
|
}
|
|
//suffix generation
|
|
if(iteration_number !=0){
|
|
suffix = iteration_number +1;
|
|
}
|
|
suffix =
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
//input = yzbqklnj
|