Lines Matching defs:password

96      * The minimum size of a valid password.
141 // consider it a complex PIN/password.
249 * Gets the device policy password mode. If the mode is non-specific, returns
362 * Check to see if a password matches the saved password.
363 * If password matches, return an opaque attestation that the challenge
366 * @param password The password to check.
367 * @param challenge The challenge to verify against the password
370 public byte[] verifyPassword(String password, long challenge, int userId)
375 getLockSettings().verifyPassword(password, challenge, userId);
391 * Check to see if a password matches the saved password.
392 * If password matches, return an opaque attestation that the challenge
395 * @param password The password to check.
396 * @param challenge The challenge to verify against the password
399 public byte[] verifyTiedProfileChallenge(String password, boolean isPattern, long challenge,
404 getLockSettings().verifyTiedProfileChallenge(password, isPattern, challenge,
420 * Check to see if a password matches the saved password. If no password exists,
422 * @param password The password to check.
423 * @return Whether the password matches the stored one.
425 public boolean checkPassword(String password, int userId) throws RequestThrottledException {
429 getLockSettings().checkPassword(password, userId);
443 * Check to see if vold already has the password.
444 * Note that this also clears vold's copy of the password.
445 * @return Whether the vold password matches or not.
456 * Check to see if a password matches any of the passwords stored in the
457 * password history.
459 * @param password The password to check.
460 * @return Whether the password matches any in the history.
462 public boolean checkPasswordHistory(String password, int userId) {
464 passwordToHash(password, userId), StandardCharsets.UTF_8);
518 * Used by device policy manager to validate the current password
525 // Quality is a password and a password exists. Return the quality.
550 * Clear any lock pattern or password.
563 // Set the encryption password to default.
576 * This is only meaningful if pattern, pin or password are not set.
620 // Update the device encryption password.
706 * Compute the password quality from the given password string.
708 static public int computePasswordQuality(String password) {
711 final int len = password.length();
713 if (Character.isDigit(password.charAt(i))) {
727 return maxLengthSequence(password) > MAX_ALLOWED_SEQUENCE
795 /** Update the encryption password if it is enabled **/
796 private void updateEncryptionPassword(final int type, final String password) {
802 Log.e(TAG, "Could not find the mount service to update the encryption password");
811 mountService.changeEncryptionPassword(type, password);
813 Log.e(TAG, "Error changing encryption password", e);
821 * Save a lock password. Does not ensure that the password is as good
823 * password.
824 * @param password The password to save
825 * @param savedPassword The previously saved lock password, or null if none
827 * @param userHandle The userId of the user to change the password for
829 public void saveLockPassword(String password, String savedPassword, int quality,
833 if (password == null || password.length() < MIN_LOCK_PASSWORD_SIZE) {
834 throw new IllegalArgumentException("password must not be null and at least "
838 getLockSettings().setLockPassword(password, savedPassword, userHandle);
840 int computedQuality = computePasswordQuality(password);
842 // Update the device encryption password.
854 updateEncryptionPassword(type, password);
866 for (int i = 0; i < password.length(); i++) {
867 char c = password.charAt(i);
883 password.length(), letters, uppercase, lowercase,
886 // The password is not anything.
892 // Add the password to the password history. We assume all
893 // password hashes have the same length for simplicity of implementation.
902 byte[] hash = passwordToHash(password, userHandle);
914 Log.e(TAG, "Unable to save lock password " + re);
921 * encrypted with the default password.
937 * Clears the encryption password.
947 * @return stored password quality
960 * @param managedUserPassword Managed profile previous password. Null when {@param enabled} is
1098 Log.v(TAG, "Initialized lock password salt for user: " + userId);
1100 // Throw an exception rather than storing a password we'll never be able to recover
1108 * Generate a hash for the given password. To avoid brute force attacks, we use a salted hash.
1112 * @param password the gesture pattern.
1116 public byte[] passwordToHash(String password, int userId) {
1117 if (password == null) {
1122 byte[] saltedPassword = (password + getSalt(userId)).getBytes();
1218 * Set whether the visible password is enabled for cryptkeeper screen.
1236 Log.e(TAG, "Error changing password visible state", e);