Home
last modified time | relevance | path

Searched refs:randomBytes (Results 1 – 8 of 8) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DKeySyncUtilsTest.java251 byte[] vaultParams = randomBytes(100); in decryptRecoveryClaimResponse_decryptsAValidResponse()
252 byte[] recoveryKey = randomBytes(32); in decryptRecoveryClaimResponse_decryptsAValidResponse()
267 byte[] vaultParams = randomBytes(100); in decryptRecoveryClaimResponse_throwsIfCannotDecrypt()
268 byte[] recoveryKey = randomBytes(32); in decryptRecoveryClaimResponse_throwsIfCannotDecrypt()
288 byte[] challenge = randomBytes(32); in encryptRecoveryClaim_encryptsLockScreenAndKeyClaimant()
289 byte[] vaultParams = randomBytes(100); in encryptRecoveryClaim_encryptsLockScreenAndKeyClaimant()
310 byte[] vaultParams = randomBytes(100); in encryptRecoveryClaim_cannotBeDecryptedWithoutChallenge()
315 /*challenge=*/ randomBytes(32), in encryptRecoveryClaim_cannotBeDecryptedWithoutChallenge()
324 RECOVERY_CLAIM_HEADER, vaultParams, randomBytes(32)), in encryptRecoveryClaim_cannotBeDecryptedWithoutChallenge()
335 byte[] challenge = randomBytes(32); in encryptRecoveryClaim_cannotBeDecryptedWithoutCorrectSecretKey()
[all …]
DRecoverableKeyGeneratorTest.java141 randomBytes(KEY_SIZE_BYTES), in importKey_storesNullMetadata()
150 randomBytes(KEY_SIZE_BYTES), in importKey_storesNonNullMetadata()
158 byte[] rawMaterial = randomBytes(KEY_SIZE_BYTES); in importKey_storesTheWrappedVersionOfTheRawMaterial()
183 private static byte[] randomBytes(int n) { in randomBytes() method in RecoverableKeyGeneratorTest
DRecoverableKeyStoreManagerTest.java212 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES); in importKey_storesTheKey()
222 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES - 1); in importKey_throwsIfInvalidLength()
245 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES); in importKeyWithMetadata_nullMetadata_storesTheKey()
258 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES); in importKeyWithMetadata_nonNullMetadata_storesTheKey()
269 byte[] keyMaterial = randomBytes(APPLICATION_KEY_SIZE_BYTES - 1); in importKeyWithMetadata_throwsIfInvalidLength()
921 .setEncryptedKeyMaterial(randomBytes(32)) in recoverKeyChainSnapshot_throwsIfNoSessionIsPresent()
925 /*recoveryKeyBlob=*/ randomBytes(32), in recoverKeyChainSnapshot_throwsIfNoSessionIsPresent()
945 /*encryptedRecoveryKey=*/ randomBytes(60), in recoverKeyChainSnapshot_throwsIfRecoveryClaimCannotBeDecrypted()
970 encryptedApplicationKey(randomRecoveryKey(), randomBytes(32))) in recoverKeyChainSnapshot_throwsIfFailedToDecryptAllApplicationKeys()
1017 byte[] applicationKeyBytes = randomBytes(32); in recoverKeyChainSnapshot_returnsDecryptedKeys()
[all …]
DKeySyncTaskTest.java182 byte[] salt = randomBytes(16); in hashCredentialsBySaltedSha256_returnsSameHashForSameCredentialsAndSalt()
191 byte[] salt = randomBytes(16); in hashCredentialsBySaltedSha256_returnsDifferentHashForDifferentCredentials()
205 KeySyncTask.hashCredentialsBySaltedSha256(randomBytes(64), in hashCredentialsBySaltedSha256_returnsDifferentHashForDifferentSalt()
207 KeySyncTask.hashCredentialsBySaltedSha256(randomBytes(64), in hashCredentialsBySaltedSha256_returnsDifferentHashForDifferentSalt()
882 private static byte[] randomBytes(int n) { in randomBytes() method in KeySyncTaskTest
/frameworks/base/media/java/android/mtp/
DMtpServer.java103 byte[] randomBytes = new byte[sID_LEN_BYTES]; in getRandId()
105 randomVal.nextBytes(randomBytes); in getRandId()
106 return ByteStringUtils.toHexString(randomBytes); in getRandId()
/frameworks/base/services/backup/java/com/android/server/backup/fullbackup/
DPerformAdbBackupTask.java143 .randomBytes(PasswordUtils.PBKDF2_SALT_SIZE); in emitAesBackupHeader()
153 .randomBytes(PasswordUtils.PBKDF2_SALT_SIZE); in emitAesBackupHeader()
/frameworks/base/services/core/java/com/android/server/pm/
DInstantAppRegistry.java235 byte[] randomBytes = new byte[8]; in generateInstantAppAndroidIdLPw()
236 new SecureRandom().nextBytes(randomBytes); in generateInstantAppAndroidIdLPw()
237 String id = ByteStringUtils.toHexString(randomBytes).toLowerCase(Locale.US); in generateInstantAppAndroidIdLPw()
/frameworks/base/services/backup/java/com/android/server/backup/
DUserBackupManagerService.java1047 public byte[] randomBytes(int bits) { in randomBytes() method in UserBackupManagerService