Please Help C++ coding IF ELSE HASH FUNCTION
I have 2 parts of a code a code that i am not too sure how towrite.
first part .
// generates random alphanumeric string of lengthlen
void gen_random(char *s, const int len)
{
// Define an array with all the providedcharacters
// Generate random string using the characters oflength ‘len’
So far i have
char alphanum[] = “0123456789!”#$%&'()*+-/.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz”;
for (int i = 0; i < len; ++i) {
s[i] = alphanum[rand() % (sizeof(alphanum) – 1)];
}
s[len] = 0;
Second Part
// compares first len bytes of two hash values hash1 andhash2
int match_digest (char *hash1, char *hash2, int len)
{
/* Judge whether ‘hash1’ and
PayPal Gateway not configured
PayPal Gateway not configured