Home
last modified time | relevance | path

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

123456789

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DPasswordHelperTest.java49 byte[] password = "lov".getBytes(); in testValidatePasswordTooShort()
50 assertThat(mPasswordHelper.validate(password)) in testValidatePasswordTooShort()
59 byte[] password = "pass wd".getBytes(); in testValidatePasswordWhiteSpace()
60 assertThat(mPasswordHelper.validate(password)) in testValidatePasswordWhiteSpace()
70 byte[] password = "1passwýd".getBytes(); in testValidatePasswordNonAscii()
71 assertThat(mPasswordHelper.validate(password)) in testValidatePasswordNonAscii()
80 byte[] password = "1a34".getBytes(); in testValidatePinContainingNonDigits()
81 assertThat(mPinHelper.validate(password)) in testValidatePinContainingNonDigits()
90 byte[] password = "12".getBytes(); in testValidatePinWithTooFewDigits()
91 assertThat(mPinHelper.validate(password)) in testValidatePinWithTooFewDigits()
[all …]
DInitialLockSetupServiceTest.java176 byte[] password = "password".getBytes(); in testSetLockPassword_setsDevicePassword()
178 byte[] expectedPassword = Arrays.copyOf(password, password.length); in testSetLockPassword_setsDevicePassword()
179 int result = service.setLock(LockTypes.PASSWORD, password); in testSetLockPassword_setsDevicePassword()
189 byte[] password = "1580".getBytes(); in testSetLockPin_setsDevicePin()
190 byte[] expectedPassword = Arrays.copyOf(password, password.length); in testSetLockPin_setsDevicePin()
191 int result = service.setLock(LockTypes.PIN, password); in testSetLockPin_setsDevicePin()
/packages/apps/Settings/src/com/android/settings/wifi/
DWifiUtils.java56 public static boolean isHotspotPasswordValid(String password) { in isHotspotPasswordValid() argument
57 if (TextUtils.isEmpty(password)) { in isHotspotPasswordValid()
61 final int length = password.length(); in isHotspotPasswordValid()
135 String password) { in getWifiConfig() argument
167 if (!TextUtils.isEmpty(password)) { in getWifiConfig()
168 int length = password.length(); in getWifiConfig()
171 && password.matches("[0-9A-Fa-f]*")) { in getWifiConfig()
172 config.wepKeys[0] = password; in getWifiConfig()
174 config.wepKeys[0] = '"' + password + '"'; in getWifiConfig()
181 if (!TextUtils.isEmpty(password)) { in getWifiConfig()
[all …]
DWifiConfigController.java498 boolean isValidPsk(String password) { in isValidPsk() argument
499 if (password.length() == 64 && password.matches("[0-9A-Fa-f]{64}")) { in isValidPsk()
501 } else if (password.length() >= 8 && password.length() <= 63) { in isValidPsk()
507 boolean isValidSaePassword(String password) { in isValidSaePassword() argument
508 if (password.length() >= 1 && password.length() <= 63) { in isValidSaePassword()
632 String password = mPasswordView.getText().toString(); in getConfig() local
635 && password.matches("[0-9A-Fa-f]*")) { in getConfig()
636 config.wepKeys[0] = password; in getConfig()
638 config.wepKeys[0] = '"' + password + '"'; in getConfig()
646 String password = mPasswordView.getText().toString(); in getConfig() local
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/
DWifiUtils.java56 public static boolean isHotspotPasswordValid(String password) { in isHotspotPasswordValid() argument
57 if (TextUtils.isEmpty(password)) { in isHotspotPasswordValid()
61 final int length = password.length(); in isHotspotPasswordValid()
135 String password) { in getWifiConfig() argument
167 if (!TextUtils.isEmpty(password)) { in getWifiConfig()
168 int length = password.length(); in getWifiConfig()
171 && password.matches("[0-9A-Fa-f]*")) { in getWifiConfig()
172 config.wepKeys[0] = password; in getWifiConfig()
174 config.wepKeys[0] = '"' + password + '"'; in getWifiConfig()
181 if (!TextUtils.isEmpty(password)) { in getWifiConfig()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/
DWifiUtils.java63 String password) { in getWifiConfig() argument
93 if (!TextUtils.isEmpty(password)) { in getWifiConfig()
94 int length = password.length(); in getWifiConfig()
97 && password.matches("[0-9A-Fa-f]*")) { in getWifiConfig()
98 config.wepKeys[0] = password; in getWifiConfig()
100 config.wepKeys[0] = '"' + password + '"'; in getWifiConfig()
107 if (!TextUtils.isEmpty(password)) { in getWifiConfig()
108 if (password.matches("[0-9A-Fa-f]{64}")) { in getWifiConfig()
109 config.preSharedKey = password; in getWifiConfig()
111 config.preSharedKey = '"' + password + '"'; in getWifiConfig()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/
DWifiConfigControllerTest.java144 final TextView password = mView.findViewById(R.id.password); in isSubmittable_longPsk_shouldReturnFalse() local
145 assertThat(password).isNotNull(); in isSubmittable_longPsk_shouldReturnFalse()
146 password.setText(LONG_PSK); in isSubmittable_longPsk_shouldReturnFalse()
152 final TextView password = mView.findViewById(R.id.password); in isSubmittable_shortPsk_shouldReturnFalse() local
153 assertThat(password).isNotNull(); in isSubmittable_shortPsk_shouldReturnFalse()
154 password.setText(SHORT_PSK); in isSubmittable_shortPsk_shouldReturnFalse()
160 final TextView password = mView.findViewById(R.id.password); in isSubmittable_goodPsk_shouldReturnTrue() local
161 assertThat(password).isNotNull(); in isSubmittable_goodPsk_shouldReturnTrue()
162 password.setText(GOOD_PSK); in isSubmittable_goodPsk_shouldReturnTrue()
168 final TextView password = mView.findViewById(R.id.password); in isSubmittable_hexPsk_shouldReturnTrue() local
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/setup/
DEnterPasswordState.java164 String password = action.getTitle().toString(); in onGuidedActionEditedAndProceed() local
165 if (password.length() >= WEP_MIN_LENGTH) { in onGuidedActionEditedAndProceed()
168 setWifiConfigurationPassword(password); in onGuidedActionEditedAndProceed()
182 private void setWifiConfigurationPassword(String password) { in setWifiConfigurationPassword() argument
186 int length = password.length(); in setWifiConfigurationPassword()
189 && password.matches("[0-9A-Fa-f]*")) { in setWifiConfigurationPassword()
190 wifiConfiguration.wepKeys[0] = password; in setWifiConfigurationPassword()
192 wifiConfiguration.wepKeys[0] = '"' + password + '"'; in setWifiConfigurationPassword()
196 && password.length() < PSK_MIN_LENGTH) { in setWifiConfigurationPassword()
199 if (password.matches("[0-9A-Fa-f]{64}")) { in setWifiConfigurationPassword()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/security/
DPasswordHelper.java68 public int validate(byte[] password) { in validate() argument
69 return mIsPin ? validatePin(password) : validatePassword(password); in validate()
78 public int validateSetupWizard(byte[] password) { in validateSetupWizard() argument
79 return mIsPin ? translateSettingsToSuwError(validatePin(password)) in validateSetupWizard()
80 : translateSettingsToSuwError(validatePassword(password)); in validateSetupWizard()
95 private int validatePassword(byte[] password) { in validatePassword() argument
98 if (password.length < MIN_LENGTH) { in validatePassword()
103 for (int i = 0; i < password.length; i++) { in validatePassword()
104 char c = (char) password[i]; in validatePassword()
/packages/apps/Car/Settings/src/com/android/car/settings/setupservice/
DInitialLockSetupService.java119 public int checkValidLock(@LockTypes int lockType, byte[] password) { in checkValidLock() argument
124 return passwordHelper.validateSetupWizard(password); in checkValidLock()
127 return passwordHelper.validateSetupWizard(password); in checkValidLock()
129 return password.length >= LockPatternUtils.MIN_LOCK_PATTERN_SIZE in checkValidLock()
139 public int setLock(@LockTypes int lockType, byte[] password) { in setLock() argument
150 if (!InitialLockSetupHelper.isValidLockResultCode(checkValidLock(lockType, password))) { in setLock()
162 InitialLockSetupHelper.byteArrayToCharSequence(password)); in setLock()
172 InitialLockSetupHelper.byteArrayToCharSequence(password)); in setLock()
180 List<LockPatternView.Cell> pattern = toSettingsPattern(password); in setLock()
193 Arrays.fill(password, (byte) 0); in setLock()
/packages/apps/Settings/src/com/android/settings/security/
DCryptKeeperSettings.java44 import com.android.settings.password.ChooseLockSettingsHelper;
45 import com.android.settings.password.ConfirmLockPattern;
196 byte[] password = data.getByteArrayExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD); in onActivityResult()
197 if (!(password == null || password.length == 0)) { in onActivityResult()
198 showFinalConfirmation(type, password); in onActivityResult()
203 private void showFinalConfirmation(int type, byte[] password) { in showFinalConfirmation() argument
207 addEncryptionInfoToPreference(preference, type, password); in showFinalConfirmation()
211 private void addEncryptionInfoToPreference(Preference preference, int type, byte[] password) { in addEncryptionInfoToPreference() argument
220 preference.getExtras().putByteArray(PASSWORD, password); in addEncryptionInfoToPreference()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/security/
DCryptKeeperSettings.java44 import com.android.car.developeroptions.password.ChooseLockSettingsHelper;
45 import com.android.car.developeroptions.password.ConfirmLockPattern;
196 byte[] password = data.getByteArrayExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD); in onActivityResult()
197 if (!(password == null || password.length == 0)) { in onActivityResult()
198 showFinalConfirmation(type, password); in onActivityResult()
203 private void showFinalConfirmation(int type, byte[] password) { in showFinalConfirmation() argument
207 addEncryptionInfoToPreference(preference, type, password); in showFinalConfirmation()
211 private void addEncryptionInfoToPreference(Preference preference, int type, byte[] password) { in addEncryptionInfoToPreference() argument
220 preference.getExtras().putByteArray(PASSWORD, password); in addEncryptionInfoToPreference()
/packages/apps/PermissionController/src/com/android/packageinstaller/permission/service/
DBaseSearchIndexablesProvider.java75 String password = sharedPreferences.getString( in getPassword() local
77 if (password == null) { in getPassword()
78 password = UUID.randomUUID().toString(); in getPassword()
80 .putString(Constants.SEARCH_INDEXABLE_PROVIDER_PASSWORD_KEY, password) in getPassword()
83 return password; in getPassword()
112 String password = getPassword(context); in isIntentValid() local
113 boolean verified = Objects.equals(passwordFromIntent, password); in isIntentValid()
/packages/modules/IPsec/src/java/com/android/internal/net/eap/statemachine/
DEapMsChapV2MethodStateMachine.java273 mEapMsChapV2Config.password); in process()
362 mEapMsChapV2Config.password, in process()
452 byte[] msk = generateMsk(mEapMsChapV2Config.password, mNtResponse); in process()
505 static byte[] passwordToBytes(String password) { in passwordToBytes() argument
506 return password.getBytes(StandardCharsets.UTF_16LE); in passwordToBytes()
512 byte[] authenticatorChallenge, byte[] peerChallenge, String username, String password) in generateNtResponse() argument
515 byte[] passwordHash = ntPasswordHash(password); in generateNtResponse()
533 static byte[] ntPasswordHash(String password) { in ntPasswordHash() argument
535 byte[] passwordBytes = passwordToBytes(password); in ntPasswordHash()
596 String password, in generateAuthenticatorResponse() argument
[all …]
/packages/modules/IPsec/src/java/android/net/eap/
DEapSessionConfig.java202 public Builder setEapMsChapV2Config(@NonNull String username, @NonNull String password) { in setEapMsChapV2Config() argument
203 mEapConfigs.put(EAP_TYPE_MSCHAP_V2, new EapMsChapV2Config(username, password)); in setEapMsChapV2Config()
392 @NonNull public final String password; field in EapSessionConfig.EapMsChapV2Config
396 public EapMsChapV2Config(String username, String password) { in EapMsChapV2Config() argument
399 if (username == null || password == null) { in EapMsChapV2Config()
404 this.password = password; in EapMsChapV2Config()
424 return password; in getPassword()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/password/
DChooseLockPassword.java17 package com.android.car.developeroptions.password;
26 import static com.android.car.developeroptions.password.ChooseLockSettingsHelper.EXTRA_KEY_REQUESTE…
127 public IntentBuilder setPassword(byte[] password) { in setPassword() argument
128 mIntent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, password); in setPassword()
719 int validatePassword(byte[] password) { in validatePassword() argument
721 final PasswordMetrics metrics = PasswordMetrics.computeForPassword(password); in validatePassword()
724 if (password == null || password.length < mPasswordMinLength) { in validatePassword()
728 } else if (password.length > mPasswordMaxLength) { in validatePassword()
734 && metrics.numeric == password.length) { in validatePassword()
751 final int sequence = PasswordMetrics.maxLengthSequence(password); in validatePassword()
[all …]
/packages/apps/Settings/src/com/android/settings/password/
DChooseLockPassword.java17 package com.android.settings.password;
26 import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_REQUESTED_MIN_COMPLE…
127 public IntentBuilder setPassword(byte[] password) { in setPassword() argument
128 mIntent.putExtra(ChooseLockSettingsHelper.EXTRA_KEY_PASSWORD, password); in setPassword()
718 int validatePassword(byte[] password) { in validatePassword() argument
720 final PasswordMetrics metrics = PasswordMetrics.computeForPassword(password); in validatePassword()
723 if (password == null || password.length < mPasswordMinLength) { in validatePassword()
727 } else if (password.length > mPasswordMaxLength) { in validatePassword()
733 && metrics.numeric == password.length) { in validatePassword()
750 final int sequence = PasswordMetrics.maxLengthSequence(password); in validatePassword()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/wifi/
DWifiUtil.java160 String password, boolean hidden) { in connectToAccessPoint() argument
182 wifiConfig.wepKeys[0] = isHexString(password) ? password in connectToAccessPoint()
183 : "\"" + password + "\""; in connectToAccessPoint()
191 wifiConfig.preSharedKey = String.format("\"%s\"", password); in connectToAccessPoint()
243 private static boolean isHexString(String password) { in isHexString() argument
244 return HEX_PATTERN.matcher(password).matches(); in isHexString()
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/
DSetNewPasswordControllerTest.java17 package com.android.settings.password;
22 import static com.android.settings.password.ChooseLockGeneric.ChooseLockGenericFragment
24 import static com.android.settings.password.ChooseLockGeneric.ChooseLockGenericFragment
26 import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_CHALLENGE;
27 import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_FOR_FACE;
28 import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_FOR_FINGERPRINT;
29 import static com.android.settings.password.ChooseLockSettingsHelper.EXTRA_KEY_HAS_CHALLENGE;
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/wifi/
DWifiConfigurationProvider.java113 updateForWPAConfiguration(wifiConf, wifiInfo.password); in generateWifiConfiguration()
116 updateForWEPConfiguration(wifiConf, wifiInfo.password); in generateWifiConfiguration()
171 wifiEnterpriseConfig.setPassword(wifiInfo.password); in updateWifiEnterpriseConfigFromWifiInfo()
250 private void updateForWEPConfiguration(WifiConfiguration wifiConf, String password) { in updateForWEPConfiguration() argument
258 int length = password.length(); in updateForWEPConfiguration()
259 if ((length == 10 || length == 26 || length == 58) && password.matches("[0-9A-Fa-f]*")) { in updateForWEPConfiguration()
260 wifiConf.wepKeys[0] = password; in updateForWEPConfiguration()
262 wifiConf.wepKeys[0] = '"' + password + '"'; in updateForWEPConfiguration()
/packages/apps/Settings/tests/robotests/assets/
Dgrandfather_not_implementing_instrumentable4 com.android.settings.password.ChooseLockPassword$SaveAndFinishWorker
5 com.android.settings.password.ChooseLockPattern$SaveAndFinishWorker
7 com.android.settings.password.ConfirmDeviceCredentialBaseFragment$LastTryDialog
8 com.android.settings.password.CredentialCheckResultTracker
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/store/
DImapStore.java40 private final String password; field in ImapStore
56 String password, in ImapStore() argument
64 this.password = password; in ImapStore()
81 return password; in getPassword()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/dpp/
DWifiDppQrCodeGeneratorFragment.java128 final String password = wifiNetworkConfig.getPreSharedKey(); in onViewCreated() local
129 mPasswordView = view.findViewById(R.id.password); in onViewCreated()
130 if (TextUtils.isEmpty(password)) { in onViewCreated()
141 mPasswordView.setText(getString(R.string.wifi_dpp_hotspot_password, password)); in onViewCreated()
143 mPasswordView.setText(getString(R.string.wifi_dpp_wifi_password, password)); in onViewCreated()
/packages/apps/Settings/src/com/android/settings/wifi/dpp/
DWifiDppQrCodeGeneratorFragment.java128 final String password = wifiNetworkConfig.getPreSharedKey(); in onViewCreated() local
129 mPasswordView = view.findViewById(R.id.password); in onViewCreated()
130 if (TextUtils.isEmpty(password)) { in onViewCreated()
141 mPasswordView.setText(getString(R.string.wifi_dpp_hotspot_password, password)); in onViewCreated()
143 mPasswordView.setText(getString(R.string.wifi_dpp_wifi_password, password)); in onViewCreated()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/wifi/
DWifiConfigurationProviderTest.java370 String password, String identity, String anonymousIdentity, String domain, in buildTestWifiInfoForEAPWithCertificates() argument
375 .setPassword(password) in buildTestWifiInfoForEAPWithCertificates()
392 String password, String identity, String anonymousIdentity, String domain, in assertEnterpriseConfig() argument
394 assertEnterpriseConfigBase(wifiConf, password, identity, anonymousIdentity, domain); in assertEnterpriseConfig()
399 String password, String identity, String anonymousIdentity, String domain) { in assertEnterpriseConfigWithoutCertificates() argument
400 assertEnterpriseConfigBase(wifiConf, password, identity, anonymousIdentity, domain); in assertEnterpriseConfigWithoutCertificates()
404 private void assertEnterpriseConfigBase(WifiConfiguration wifiConf, String password, in assertEnterpriseConfigBase() argument
407 assertEquals(password, wifiConf.enterpriseConfig.getPassword()); in assertEnterpriseConfigBase()

123456789