Home
last modified time | relevance | path

Searched refs:password (Results 1 – 25 of 130) sorted by relevance

123456

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DSyntheticPasswordTests.java74 final LockscreenCredential password = newPassword("user-password"); in testPasswordBasedSyntheticPassword() local
81 password, authToken, USER_ID); in testPasswordBasedSyntheticPassword()
84 mGateKeeperService, handle, password, USER_ID, null); in testPasswordBasedSyntheticPassword()
105 protected void initializeCredentialUnderSP(LockscreenCredential password, int userId) in initializeCredentialUnderSP() argument
108 assertTrue(mService.setLockCredential(password, nonePassword(), userId)); in initializeCredentialUnderSP()
115 final LockscreenCredential password = newPassword("password"); in testSyntheticPasswordChangeCredential() local
118 initializeCredentialUnderSP(password, PRIMARY_USER_ID); in testSyntheticPasswordChangeCredential()
120 mService.setLockCredential(newPassword, password, PRIMARY_USER_ID); in testSyntheticPasswordChangeCredential()
129 LockscreenCredential password = newPassword("password"); in testSyntheticPasswordVerifyCredential() local
132 initializeCredentialUnderSP(password, PRIMARY_USER_ID); in testSyntheticPasswordVerifyCredential()
[all …]
DFakeGateKeeperService.java33 public byte[] password; field in FakeGateKeeperService.VerifyHandle
36 public VerifyHandle(byte[] password, long sid) { in VerifyHandle() argument
37 this.password = password; in VerifyHandle()
47 password = new byte[buffer.remaining()]; in VerifyHandle()
48 buffer.get(password); in VerifyHandle()
52 ByteBuffer buffer = ByteBuffer.allocate(1 + Long.BYTES + password.length); in toBytes()
55 buffer.put(password); in toBytes()
97 if (Arrays.equals(currentPassword, handle.password)) { in enroll()
128 if (Arrays.equals(handle.password, providedPassword)) { in verifyChallenge()
DMockSyntheticPasswordManager.java98 protected byte[] scrypt(byte[] password, byte[] salt, int n, int r, int p, int outLen) { in scrypt() argument
100 char[] passwordChars = new char[password.length]; in scrypt()
101 for (int i = 0; i < password.length; i++) { in scrypt()
102 passwordChars[i] = (char) password[i]; in scrypt()
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/functional/
DWifiAssociationTest.java64 String password = arguments.getString("password"); in testWifiAssociation() local
71 WifiConfiguration config = getConfig(ssid, securityType, password); in testWifiAssociation()
80 private WifiConfiguration getConfig(String ssid, SecurityType securityType, String password) { in getConfig() argument
89 assertNotNull("password is empty", password); in getConfig()
91 assertTrue(WifiConfigurationHelper.isHex(password, 10)); in getConfig()
92 config = WifiConfigurationHelper.createWepConfig(ssid, password); in getConfig()
96 assertNotNull("password is empty", password); in getConfig()
98 assertTrue(WifiConfigurationHelper.isHex(password, 26)); in getConfig()
99 config = WifiConfigurationHelper.createWepConfig(ssid, password); in getConfig()
103 assertNotNull("password is empty", password); in getConfig()
[all …]
/frameworks/base/core/tests/coretests/src/com/android/internal/widget/
DLockscreenCredentialTest.java52 LockscreenCredential password = LockscreenCredential.createPassword("password"); in testPasswordCredential() local
54 assertTrue(password.isPassword()); in testPasswordCredential()
55 assertEquals(8, password.size()); in testPasswordCredential()
56 assertTrue(Arrays.equals("password".getBytes(), password.getCredential())); in testPasswordCredential()
58 assertFalse(password.isNone()); in testPasswordCredential()
59 assertFalse(password.isPin()); in testPasswordCredential()
60 assertFalse(password.isPattern()); in testPasswordCredential()
100 LockscreenCredential password = LockscreenCredential.createPassword("password"); in testSanitize() local
101 password.zeroize(); in testSanitize()
104 password.isNone(); in testSanitize()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/
DBackupPasswordManagerTest.java96 String password = "password1234"; in backupPasswordMatches_isTrueForSamePassword() local
97 mPasswordManager.setBackupPassword(null, password); in backupPasswordMatches_isTrueForSamePassword()
98 assertThat(mPasswordManager.backupPasswordMatches(password)).isTrue(); in backupPasswordMatches_isTrueForSamePassword()
109 String password = "corgi\uFFFF"; in backupPasswordMatches_worksForV1HashIfVersionIsV1() local
111 writeV1HashToFile(password, saltFixture()); in backupPasswordMatches_worksForV1HashIfVersionIsV1()
116 assertThat(mPasswordManager.backupPasswordMatches(password)).isTrue(); in backupPasswordMatches_worksForV1HashIfVersionIsV1()
124 String password = "corgi\uFFFF"; in backupPasswordMatches_failsForV1HashIfVersionIsV2() local
126 writeV1HashToFile(password, saltFixture()); in backupPasswordMatches_failsForV1HashIfVersionIsV2()
131 assertThat(mPasswordManager.backupPasswordMatches(password)).isFalse(); in backupPasswordMatches_failsForV1HashIfVersionIsV2()
146 String password = "shiba"; in setBackupPassword_persistsPasswordToFile() local
[all …]
/frameworks/base/core/tests/ConnectivityManagerTest/src/com/android/connectivitymanagertest/
DWifiConfigurationHelper.java72 public static WifiConfiguration createWepConfig(String ssid, String password) { in createWepConfig() argument
75 if (isHex(password, 10) || isHex(password, 26) || isHex(password, 58)) { in createWepConfig()
76 config.wepKeys[0] = password; in createWepConfig()
78 config.wepKeys[0] = quotedString(password); in createWepConfig()
94 public static WifiConfiguration createPskConfig(String ssid, String password) { in createPskConfig() argument
97 if (isHex(password, 64)) { in createPskConfig()
98 config.preSharedKey = password; in createPskConfig()
100 config.preSharedKey = quotedString(password); in createPskConfig()
119 public static WifiConfiguration createEapConfig(String ssid, String password, int eapMethod, in createEapConfig() argument
135 config.enterpriseConfig.setPassword(password); in createEapConfig()
[all …]
DConnectivityManagerTestRunner.java62 String password = (String) icicle.get("password"); in onCreate() local
63 if (password != null) { in onCreate()
64 mPassword = password; in onCreate()
/frameworks/base/obex/javax/obex/
DPasswordAuthentication.java53 public PasswordAuthentication(final byte[] userName, final byte[] password) { in PasswordAuthentication() argument
59 mPassword = new byte[password.length]; in PasswordAuthentication()
60 System.arraycopy(password, 0, mPassword, 0, password.length); in PasswordAuthentication()
DObexSession.java144 byte[] password = result.getPassword(); in handleAuthChall()
145 if (password == null) { in handleAuthChall()
169 byte[] digest = new byte[challenge.length + password.length + 1]; in handleAuthChall()
173 System.arraycopy(password, 0, digest, challenge.length + 1, password.length); in handleAuthChall()
/frameworks/base/core/jni/
Dandroid_security_Scrypt.cpp34 static jbyteArray android_security_Scrypt_nativeScrypt(JNIEnv* env, jobject, jbyteArray password, j… in android_security_Scrypt_nativeScrypt() argument
35 if (!password || !salt) { in android_security_Scrypt_nativeScrypt()
39 int passwordLen = env->GetArrayLength(password); in android_security_Scrypt_nativeScrypt()
43 jbyte* passwordPtr = (jbyte*)env->GetByteArrayElements(password, NULL); in android_security_Scrypt_nativeScrypt()
50 env->ReleaseByteArrayElements(password, passwordPtr, JNI_ABORT); in android_security_Scrypt_nativeScrypt()
/frameworks/base/core/java/com/android/internal/widget/
DLockscreenCredential.java103 public static LockscreenCredential createPassword(@NonNull CharSequence password) { in createPassword() argument
105 charSequenceToByteArray(password)); in createPassword()
114 public static LockscreenCredential createManagedPassword(@NonNull byte[] password) { in createManagedPassword() argument
116 Arrays.copyOf(password, password.length)); in createManagedPassword()
131 public static LockscreenCredential createPasswordOrNone(@Nullable CharSequence password) { in createPasswordOrNone() argument
132 if (TextUtils.isEmpty(password)) { in createPasswordOrNone()
135 return createPassword(password); in createPasswordOrNone()
/frameworks/base/core/tests/coretests/src/android/app/admin/
DPasswordMetricsTest.java260 PasswordMetrics password = new PasswordMetrics(CREDENTIAL_TYPE_PASSWORD); in testMerge_credentialTypes() local
265 PasswordMetrics.merge(Arrays.asList(new PasswordMetrics[]{none, password})) in testMerge_credentialTypes()
268 PasswordMetrics.merge(Arrays.asList(new PasswordMetrics[]{password, pattern})) in testMerge_credentialTypes()
276 PasswordMetrics password = new PasswordMetrics(CREDENTIAL_TYPE_PASSWORD); in testValidatePasswordMetrics_credentialTypes() local
279 password.length = 4; in testValidatePasswordMetrics_credentialTypes()
287 validatePasswordMetrics(none, PASSWORD_COMPLEXITY_NONE, false, password)); in testValidatePasswordMetrics_credentialTypes()
291 validatePasswordMetrics(pattern, PASSWORD_COMPLEXITY_NONE, false, password)); in testValidatePasswordMetrics_credentialTypes()
293 validatePasswordMetrics(password, PASSWORD_COMPLEXITY_NONE, false, password)); in testValidatePasswordMetrics_credentialTypes()
300 validatePasswordMetrics(password, PASSWORD_COMPLEXITY_NONE, false, none), in testValidatePasswordMetrics_credentialTypes()
303 validatePasswordMetrics(password, PASSWORD_COMPLEXITY_NONE, false, pattern), in testValidatePasswordMetrics_credentialTypes()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DMockScrypt.java31 public byte[] scrypt(byte[] password, byte[] salt, int n, int r, int p, int outLen) { in scrypt() argument
35 password.length + salt.length + Integer.BYTES * 6); in scrypt()
37 byteBuffer.putInt(password.length); in scrypt()
38 byteBuffer.put(password); in scrypt()
/frameworks/base/core/java/android/security/
DScrypt.java26 native byte[] nativeScrypt(byte[] password, byte[] salt, int n, int r, int p, int outLen); in nativeScrypt() argument
29 public byte[] scrypt(byte[] password, byte[] salt, int n, int r, int p, int outLen) { in scrypt() argument
30 return nativeScrypt(password, salt, n, r, p, outLen); in scrypt()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardAbsKeyInputView.java137 final LockscreenCredential password = getEnteredCredential(); in verifyPasswordAndUnlock()
144 if (password.size() <= MINIMUM_PASSWORD_LENGTH_BEFORE_REPORT) { in verifyPasswordAndUnlock()
149 password.zeroize(); in verifyPasswordAndUnlock()
161 password, in verifyPasswordAndUnlock()
173 password.zeroize(); in verifyPasswordAndUnlock()
188 password.zeroize(); in verifyPasswordAndUnlock()
199 password.zeroize(); in verifyPasswordAndUnlock()
/frameworks/opt/car/setupwizard/library/utils/src/com/android/car/setupwizardlib/
DIInitialLockSetupService.aidl39 int checkValidLock(in int lockType, in byte[] password) = 2; in checkValidLock() argument
46 int setLock(in int lockType, in byte[] password) = 3; in setLock() argument
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiConfigurationUtil.java394 private static boolean validatePassword(String password, boolean isAdd, boolean isSae) { in validatePassword() argument
396 if (password == null) { in validatePassword()
401 if (password == null) { in validatePassword()
404 } else if (password.equals(PASSWORD_MASK)) { in validatePassword()
410 if (password.isEmpty()) { in validatePassword()
414 if (password.startsWith("\"")) { in validatePassword()
416 byte[] passwordBytes = password.getBytes(StandardCharsets.US_ASCII); in validatePassword()
436 if (password.length() != PSK_SAE_HEX_LEN) { in validatePassword()
438 + password.length()); in validatePassword()
443 NativeUtil.hexOrQuotedStringToBytes(password); in validatePassword()
[all …]
/frameworks/base/core/java/com/android/internal/net/
DVpnProfile.java90 public String password = ""; // 4 field in VpnProfile
161 password = in.readString(); in VpnProfile()
212 out.writeString(password); in writeToParcel()
270 profile.password = values[4]; in decode()
305 profile.saveLogin = !profile.username.isEmpty() || !profile.password.isEmpty(); in decode()
323 builder.append(VALUE_DELIMITER).append(saveLogin ? password : ""); in encode()
442 key, type, server, username, password, dnsServers, searchDomains, routes, mppe, in hashCode()
461 && Objects.equals(password, other.password) in equals()
/frameworks/base/core/java/android/os/storage/
DIStorageManager.aidl81 int decryptStorage(in String password) = 26; field
85 int encryptStorage(int type, in String password) = 27; in encryptStorage() argument
89 int changeEncryptionPassword(int type, in String password) = 28; in changeEncryptionPassword() argument
108 int verifyEncryptionPassword(in String password) = 32; field
/frameworks/base/core/java/android/app/
DKeyguardManager.java690 public boolean isValidLockPasswordComplexity(@LockTypes int lockType, @NonNull byte[] password, in isValidLockPasswordComplexity() argument
705 adminMetrics, complexity, isPinOrPattern, password).size() == 0; in isValidLockPasswordComplexity()
747 public boolean setLock(@LockTypes int lockType, @NonNull byte[] password, in setLock() argument
759 if (!isValidLockPasswordComplexity(lockType, password, complexity)) { in setLock()
767 CharSequence passwordStr = new String(password, Charset.forName("UTF-8")); in setLock()
775 CharSequence pinStr = new String(password); in setLock()
784 LockPatternUtils.byteArrayToPattern(password); in setLock()
799 Arrays.fill(password, (byte) 0); in setLock()
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
DAuthCredentialPasswordView.java100 try (LockscreenCredential password = mCredentialType == Utils.CREDENTIAL_PIN in checkPasswordAndUnlock() argument
103 if (password.isNone()) { in checkPasswordAndUnlock()
108 password, mOperationId, mEffectiveUserId, this::onCredentialVerified); in checkPasswordAndUnlock()
/frameworks/base/core/java/android/app/admin/
DPasswordMetrics.java137 private static boolean hasInvalidCharacters(byte[] password) { in hasInvalidCharacters() argument
139 for (byte b : password) { in hasInvalidCharacters()
213 public static PasswordMetrics computeForPassword(@NonNull byte[] password) { in computeForPassword() argument
222 final int length = password.length; in computeForPassword()
223 for (byte b : password) { in computeForPassword()
247 final int seqLength = maxLengthSequence(password); in computeForPassword()
545 PasswordMetrics adminMetrics, int minComplexity, boolean isPin, byte[] password) { in validatePassword() argument
547 if (hasInvalidCharacters(password)) { in validatePassword()
552 final PasswordMetrics enteredMetrics = computeForPassword(password); in validatePassword()
/frameworks/base/tests/net/java/com/android/internal/net/
DVpnProfileTest.java58 assertEquals("", p.password); in testDefaults()
85 p.password = "qux"; in getSampleIkev2Profile()
215 decoded.password = profile.password; in testEncodeDecodeLoginsNotSaved()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DKeyStoreProxyImpl.java49 public Key getKey(String alias, char[] password) in getKey() argument
51 return mKeyStore.getKey(alias, password); in getKey()

123456