Lines Matching defs:password

197      * Gets the device policy password mode. If the mode is non-specific, returns
239 * Returns the actual password mode, as set by keyguard after updating the password.
297 KeyStore.getInstance().password(patternToString(pattern));
306 * Check to see if a password matches the saved password. If no password exists,
308 * @param password The password to check.
309 * @return Whether the password matches the stored one.
311 public boolean checkPassword(String password) {
314 final boolean matched = getLockSettings().checkPassword(passwordToHash(password),
317 KeyStore.getInstance().password(password);
326 * Check to see if a password matches any of the passwords stored in the
327 * password history.
329 * @param password The password to check.
330 * @return Whether the password matches any in the history.
332 public boolean checkPasswordHistory(String password) {
333 String passwordHashString = new String(passwordToHash(password));
397 * Used by device policy manager to validate the current password
443 * Clear any lock pattern or password.
456 * This is only meaningful if pattern, pin or password are not set.
515 keyStore.password(patternToString(pattern));
543 * Compute the password quality from the given password string.
545 static public int computePasswordQuality(String password) {
548 final int len = password.length();
550 if (Character.isDigit(password.charAt(i))) {
569 /** Update the encryption password if it is enabled **/
570 private void updateEncryptionPassword(String password) {
579 Log.e(TAG, "Could not find the mount service to update the encryption password");
585 mountService.changeEncryptionPassword(password);
587 Log.e(TAG, "Error changing encryption password", e);
592 * Save a lock password. Does not ensure that the password is as good
595 * @param password The password to save
598 public void saveLockPassword(String password, int quality) {
599 this.saveLockPassword(password, quality, false, getCurrentOrCallingUserId());
603 * Save a lock password. Does not ensure that the password is as good
606 * @param password The password to save
610 public void saveLockPassword(String password, int quality, boolean isFallback) {
611 saveLockPassword(password, quality, isFallback, getCurrentOrCallingUserId());
615 * Save a lock password. Does not ensure that the password is as good
618 * @param password The password to save
621 * @param userHandle The userId of the user to change the password for
623 public void saveLockPassword(String password, int quality, boolean isFallback, int userHandle) {
625 final byte[] hash = passwordToHash(password);
630 if (password != null) {
632 // Update the encryption password.
633 updateEncryptionPassword(password);
635 // Update the keystore password
636 keyStore.password(password);
639 int computedQuality = computePasswordQuality(password);
650 for (int i = 0; i < password.length(); i++) {
651 char c = password.charAt(i);
667 password.length(), letters, uppercase, lowercase,
670 // The password is not anything.
685 // Add the password to the password history. We assume all
686 // password
716 Log.e(TAG, "Unable to save lock password " + re);
724 * @return stored password quality
816 Log.v(TAG, "Initialized lock password salt");
818 // Throw an exception rather than storing a password we'll never be able to recover
826 * Generate a hash for the given password. To avoid brute force attacks, we use a salted hash.
829 * @param password the gesture pattern.
832 public byte[] passwordToHash(String password) {
833 if (password == null) {
839 byte[] saltedPassword = (password + getSalt()).getBytes();
860 * @return Whether the lock password is enabled, or if it is set as a backup for biometric weak