I am writing a program that will calculate password strength according to two formulas. One of these formulas requires me to extract certain parts of the password, first character, next seven, next 12, and all remaining characters. I am having trouble extracting all the remaining characters.
I am unsure how what to put in the upper bounds for the substring method. Here is my code.
Any help would be greatly appreciated!
cout << "Now please enter a password of 20 characters or more (including spaces!):" << endl; getline(cin, twenty_password); cout << "What character set is being used?"; cin >> character_set_20; twenty_length = twenty_password.length(); twenty_ent_strength = (twenty_length*((log(character_set_20)) / (log(2)))); first_char_twenty = twenty_password.substr(0, 1); next_seven_twenty = twenty_password.substr(1, 7); next_twelve = twenty_password.substr(7, 19);