Home
last modified time | relevance | path

Searched refs:keyBytes (Results 1 – 20 of 20) sorted by relevance

/frameworks/base/core/java/android/net/nsd/
DDnsSdTxtRecord.java70 byte[] keyBytes; in set()
83 keyBytes = key.getBytes("US-ASCII"); in set()
89 for (int i = 0; i < keyBytes.length; i++) { in set()
90 if (keyBytes[i] == '=') { in set()
95 if (keyBytes.length + valLen >= 255) { in set()
103 insert(keyBytes, valBytes, currentLoc); in set()
168 private void insert(byte[] keyBytes, byte[] value, int index) { in insert() argument
178 avLen = keyBytes.length + valLen + (value != null ? 1 : 0); in insert()
186 System.arraycopy(keyBytes, 0, mData, insertion + 1, keyBytes.length); in insert()
188 mData[insertion + 1 + keyBytes.length] = mSeperator; in insert()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/cdc/
DFingerprintMixerTest.java77 byte[] keyBytes = new byte[KEY_SIZE_BITS / 8]; in create_withUnencodableSecretKey_throwsInvalidKeyException()
79 new UnencodableSecretKeySpec(keyBytes, 0, keyBytes.length, KEY_ALGORITHM); in create_withUnencodableSecretKey_throwsInvalidKeyException()
182 byte[] keyBytes = new byte[KEY_SIZE_BITS / 8]; in randomKey()
183 mSeededRandom.nextBytes(keyBytes); in randomKey()
184 return new SecretKeySpec(keyBytes, 0, keyBytes.length, KEY_ALGORITHM); in randomKey()
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/cdc/
DFingerprintMixer.java61 byte[] keyBytes = secretKey.getEncoded(); in FingerprintMixer()
62 if (keyBytes == null) { in FingerprintMixer()
66 Hkdf.hkdf(keyBytes, salt, DERIVED_KEY_NAME.getBytes(StandardCharsets.UTF_8)); in FingerprintMixer()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DSP800DeriveTests.java31 byte[] keyBytes = HexDump.hexStringToByteArray( in testFixedInput()
34 SP800Derive sk = new SP800Derive(keyBytes); in testFixedInput()
/frameworks/base/services/core/java/com/android/server/locksettings/
DSP800Derive.java39 SP800Derive(byte[] keyBytes) { in SP800Derive() argument
40 mKeyBytes = keyBytes; in SP800Derive()
DSyntheticPasswordCrypto.java96 public static byte[] encrypt(byte[] keyBytes, byte[] personalisation, byte[] message) { in encrypt() argument
97 byte[] keyHash = personalisedHash(personalisation, keyBytes); in encrypt()
110 public static byte[] decrypt(byte[] keyBytes, byte[] personalisation, byte[] ciphertext) { in decrypt() argument
111 byte[] keyHash = personalisedHash(personalisation, keyBytes); in decrypt()
DLockSettingsService.java2238 public @Nullable String importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
2240 return mRecoverableKeyStoreManager.importKey(alias, keyBytes); in importKey()
2244 public @Nullable String importKeyWithMetadata(@NonNull String alias, @NonNull byte[] keyBytes, in importKeyWithMetadata() argument
2246 return mRecoverableKeyStoreManager.importKeyWithMetadata(alias, keyBytes, metadata); in importKeyWithMetadata()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DRecoverableKeyGenerator.java144 @NonNull byte[] keyBytes, @Nullable byte[] metadata) in importKey() argument
146 SecretKey key = new SecretKeySpec(keyBytes, SECRET_KEY_ALGORITHM); in importKey()
DRecoverableKeyStoreManager.java754 public @Nullable String importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
756 return importKeyWithMetadata(alias, keyBytes, /*metadata=*/ null); in importKey()
771 public @Nullable String importKeyWithMetadata(@NonNull String alias, @NonNull byte[] keyBytes, in importKeyWithMetadata() argument
775 Preconditions.checkNotNull(keyBytes, "keyBytes is null"); in importKeyWithMetadata()
776 if (keyBytes.length != RecoverableKeyGenerator.KEY_SIZE_BITS / Byte.SIZE) { in importKeyWithMetadata()
801 mRecoverableKeyGenerator.importKey(encryptionKey, userId, uid, alias, keyBytes, in importKeyWithMetadata()
805 mApplicationKeyStorage.setSymmetricKeyEntry(userId, uid, alias, keyBytes); in importKeyWithMetadata()
DSecureBox.java397 static PublicKey decodePublicKey(byte[] keyBytes) in decodePublicKey() argument
402 Arrays.copyOfRange(keyBytes, 1, 1 + EC_COORDINATE_LEN_BYTES)); in decodePublicKey()
407 keyBytes, 1 + EC_COORDINATE_LEN_BYTES, EC_PUBLIC_KEY_LEN_BYTES)); in decodePublicKey()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DTestData.java455 byte[] keyBytes = Base64.getDecoder().decode(INSECURE_PRIVATE_KEY_FOR_ENDPOINT1_BASE64); in getInsecurePrivateKeyForEndpoint1()
457 PKCS8EncodedKeySpec skSpec = new PKCS8EncodedKeySpec(keyBytes); in getInsecurePrivateKeyForEndpoint1()
DSecureBoxTest.java363 private static PrivateKey decodePrivateKey(byte[] keyBytes) throws Exception { in decodePrivateKey() argument
364 assertThat(keyBytes.length).isEqualTo(32); in decodePrivateKey()
365 BigInteger priv = new BigInteger(/*signum=*/ 1, keyBytes); in decodePrivateKey()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DCarrierInfoManager.java116 byte[] keyBytes = imsiEncryptionInfo.getPublicKey().getEncoded(); in updateOrInsertCarrierKey()
128 contentValues.put(Telephony.CarrierColumns.PUBLIC_KEY, keyBytes); in updateOrInsertCarrierKey()
138 updatedValues.put(Telephony.CarrierColumns.PUBLIC_KEY, keyBytes); in updateOrInsertCarrierKey()
/frameworks/base/core/java/android/security/keystore/recovery/
DRecoveryController.java617 public @NonNull Key importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
620 String grantAlias = mBinder.importKey(alias, keyBytes); in importKey()
659 public @NonNull Key importKey(@NonNull String alias, @NonNull byte[] keyBytes, in importKey() argument
663 String grantAlias = mBinder.importKeyWithMetadata(alias, keyBytes, metadata); in importKey()
/frameworks/base/core/java/com/android/internal/widget/
DILockSettings.aidl75 String importKey(String alias, in byte[] keyBytes); in importKey() argument
76 String importKeyWithMetadata(String alias, in byte[] keyBytes, in byte[] metadata); in importKeyWithMetadata() argument
/frameworks/base/services/core/java/com/android/server/updates/
DCertificateTransparencyLogInstallReceiver.java151 byte[] keyBytes = Base64.decode(base64PublicKey, Base64.DEFAULT); in getLogFileName()
153 byte[] id = MessageDigest.getInstance("SHA-256").digest(keyBytes); in getLogFileName()
/frameworks/av/drm/mediacas/plugins/clearkey/
DClearKeyCasPlugin.cpp364 const sp<ABuffer>& keyBytes = keys[keyIndex].key_bytes; in updateECM() local
365 CHECK(keyBytes->size() == kUserKeyLength); in updateECM()
368 reinterpret_cast<const uint8_t*>(keyBytes->data()), in updateECM()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverableKeyStoreDb.java591 byte[] keyBytes = in getRecoveryServicePublicKey()
593 if (keyBytes == null) { in getRecoveryServicePublicKey()
597 return decodeX509Key(keyBytes); in getRecoveryServicePublicKey()
1348 private static PublicKey decodeX509Key(byte[] keyBytes) throws InvalidKeySpecException { in decodeX509Key() argument
1349 X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(keyBytes); in decodeX509Key()
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsBackupAgent.java792 final byte[] keyBytes = key.getBytes(); in extractRelevantValues()
793 totalSize += INTEGER_BYTE_COUNT + keyBytes.length; in extractRelevantValues()
794 values[backedUpSettingIndex * 2] = keyBytes; in extractRelevantValues()
DSettingsProvider.java2402 final byte[] keyBytes = new byte[32];
2404 rand.nextBytes(keyBytes);
2407 final String userKey = ByteStringUtils.toHexString(keyBytes);
2439 final byte[] keyBytes = ByteStringUtils.fromHexToByteArray(userKey);
2443 if (keyBytes == null || (keyBytes.length != 16 && keyBytes.length != 32)) {
2450 m.init(new SecretKeySpec(keyBytes, m.getAlgorithm()));