write-a-program-in-C++-to-try-passwords-by-calculating
the MD5 hash value
#include
using namespace std;
int main() { const char* password = "password123"; // the password to try unsigned char md5result[MD5_DIGEST_LENGTH]; // the MD5 hash value
// calculate the MD5 hash value of the password
MD5((const unsigned char*)password, strlen(password), md5result);
// print the MD5 hash value
cout << "MD5 hash value of password: ";
for (int i = 0; i < MD5_DIGEST_LENGTH; i++) {
printf("%02x", md5result[i]);
}
cout << endl;
return 0;
}
原文地址: https://www.cveoy.top/t/topic/rDh 著作权归作者所有。请勿转载和采集!