checkpw method
Check that a plaintext password matches a previously hashed one.
Returns true if the passwords match, false otherwise
Implementation
bool checkpw(String plaintext, String hashed) {
return (hashed.compareTo(hashpw(plaintext, hashed)) == 0);
}