Skip to content

Instantly share code, notes, and snippets.

@kylec32
Created January 31, 2022 01:06
Show Gist options
  • Save kylec32/0524de1e96aada49a115309c3610540a to your computer and use it in GitHub Desktop.
Save kylec32/0524de1e96aada49a115309c3610540a to your computer and use it in GitHub Desktop.
Naive Password Check
private static boolean verifyPassword(String realPassword, String providedPassword) {
if (realPassword.length() != providedPassword.length()) {
return false;
}
for (int i = 0; i < realPassword.length(); i++) {
if (realPassword.charAt(i) != providedPassword.charAt(i)) {
return false;
}
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment