Home
last modified time | relevance | path

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

/frameworks/libs/net/common/src_frameworkcommon/android/net/util/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] = mSeparator; in insert()
[all …]
/frameworks/base/media/java/android/media/
DMediaMetrics.java359 final byte[] keyBytes = key.getBytes(MEDIAMETRICS_CHARSET); in Item()
360 final int keyLength = keyBytes.length; in Item()
383 .put(keyBytes).put((byte) 0) in Item()
423 final byte[] keyBytes = key.getBytes(MEDIAMETRICS_CHARSET); in putInt()
424 final char propSize = (char) reserveProperty(keyBytes, 4 /* payloadSize */); in putInt()
428 .put(keyBytes).put((byte) 0) // key, zero terminated in putInt()
446 final byte[] keyBytes = key.getBytes(MEDIAMETRICS_CHARSET); in putLong()
447 final char propSize = (char) reserveProperty(keyBytes, 8 /* payloadSize */); in putLong()
451 .put(keyBytes).put((byte) 0) // key, zero terminated in putLong()
469 final byte[] keyBytes = key.getBytes(MEDIAMETRICS_CHARSET); in putDouble()
[all …]
/frameworks/base/packages/BackupEncryption/test/robolectric/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/packages/BackupEncryption/src/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/packages/BackupEncryption/src/com/android/server/backup/encryption/keys/
DTertiaryKeyStore.java84 byte[] keyBytes = getEncodedKey(KeyWrapUtils.wrap(mSecondaryKey.getSecretKey(), key)); in save()
93 mSecondaryKey.getAlias(), applicationName, keyBytes)); in save()
175 byte[] keyBytes = getEncodedKey(wrappedKeysByApplicationName.get(applicationName)); in putAll()
179 mSecondaryKey.getAlias(), applicationName, keyBytes)); in putAll()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DSP800DeriveTests.java38 byte[] keyBytes = HexDump.hexStringToByteArray( in testFixedInput()
41 SP800Derive sk = new SP800Derive(keyBytes); in testFixedInput()
/frameworks/base/services/core/java/com/android/server/locksettings/
DRebootEscrowKey.java44 static RebootEscrowKey fromKeyBytes(byte[] keyBytes) { in fromKeyBytes() argument
45 return new RebootEscrowKey(new SecretKeySpec(keyBytes, KEY_ALGO)); in fromKeyBytes()
DSP800Derive.java39 SP800Derive(byte[] keyBytes) { in SP800Derive() argument
40 mKeyBytes = keyBytes; in SP800Derive()
DSyntheticPasswordCrypto.java98 public static byte[] encrypt(byte[] keyBytes, byte[] personalisation, byte[] message) { in encrypt() argument
99 byte[] keyHash = personalisedHash(personalisation, keyBytes); in encrypt()
112 public static byte[] decrypt(byte[] keyBytes, byte[] personalisation, byte[] ciphertext) { in decrypt() argument
113 byte[] keyHash = personalisedHash(personalisation, keyBytes); in decrypt()
DLockSettingsService.java2467 public @Nullable String importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
2469 return mRecoverableKeyStoreManager.importKey(alias, keyBytes); in importKey()
2473 public @Nullable String importKeyWithMetadata(@NonNull String alias, @NonNull byte[] keyBytes, in importKeyWithMetadata() argument
2475 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.java753 public @Nullable String importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
755 return importKeyWithMetadata(alias, keyBytes, /*metadata=*/ null); in importKey()
770 public @Nullable String importKeyWithMetadata(@NonNull String alias, @NonNull byte[] keyBytes, in importKeyWithMetadata() argument
774 Objects.requireNonNull(keyBytes, "keyBytes is null"); in importKeyWithMetadata()
775 if (keyBytes.length != RecoverableKeyGenerator.KEY_SIZE_BITS / Byte.SIZE) { in importKeyWithMetadata()
798 mRecoverableKeyGenerator.importKey(encryptionKey, userId, uid, alias, keyBytes, in importKeyWithMetadata()
802 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.java115 byte[] keyBytes = imsiEncryptionInfo.getPublicKey().getEncoded(); in updateOrInsertCarrierKey()
127 contentValues.put(Telephony.CarrierColumns.PUBLIC_KEY, keyBytes); in updateOrInsertCarrierKey()
137 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.java158 byte[] keyBytes = Base64.decode(base64PublicKey, Base64.DEFAULT); in getLogFileName()
160 byte[] id = MessageDigest.getInstance("SHA-256").digest(keyBytes); in getLogFileName()
/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
DSettingsBackupAgentTest.java225 byte[] keyBytes = key.getBytes(); in generateBackupData()
227 buffer.putInt(keyBytes.length); in generateBackupData()
228 buffer.put(keyBytes); in generateBackupData()
/frameworks/av/drm/mediacas/plugins/clearkey/
DClearKeyCasPlugin.cpp385 const sp<ABuffer>& keyBytes = keys[keyIndex].key_bytes; in updateECM() local
386 CHECK(keyBytes->size() == kUserKeyLength); in updateECM()
389 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.java1001 final byte[] keyBytes = key.getBytes(); in extractRelevantValues()
1002 totalSize += INTEGER_BYTE_COUNT + keyBytes.length; in extractRelevantValues()
1003 values[backedUpSettingIndex * 2] = keyBytes; in extractRelevantValues()
DSettingsProvider.java2593 final byte[] keyBytes = new byte[32];
2595 rand.nextBytes(keyBytes);
2598 final String userKey = HexEncoding.encodeToString(keyBytes, true /* upperCase */);
2633 final byte[] keyBytes = HexEncoding.decode(userKey);
2637 if (keyBytes.length != 16 && keyBytes.length != 32) {
2644 m.init(new SecretKeySpec(keyBytes, m.getAlgorithm()));