checkpw method

bool checkpw(
  1. String plaintext,
  2. String hashed
)

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);
}