Home
last modified time | relevance | path

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

/aosp14/frameworks/base/media/java/android/media/
H A DMediaMetrics.java406 final byte[] keyBytes = key.getBytes(MEDIAMETRICS_CHARSET); in Item()
407 final int keyLength = keyBytes.length; in Item()
430 .put(keyBytes).put((byte) 0) in Item()
470 final byte[] keyBytes = key.getBytes(MEDIAMETRICS_CHARSET); in putInt()
475 .put(keyBytes).put((byte) 0) // key, zero terminated in putInt()
493 final byte[] keyBytes = key.getBytes(MEDIAMETRICS_CHARSET); in putLong()
498 .put(keyBytes).put((byte) 0) // key, zero terminated in putLong()
521 .put(keyBytes).put((byte) 0) // key, zero terminated in putDouble()
545 .put(keyBytes).put((byte) 0) // key, zero terminated in putString()
790 final int keyLength = keyBytes.length; in reserveProperty()
[all …]
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
H A DSP800DeriveTests.java38 byte[] keyBytes = HexDump.hexStringToByteArray( in testFixedInput()
41 SP800Derive sk = new SP800Derive(keyBytes); in testFixedInput()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/
H A DRebootEscrowKey.java44 static RebootEscrowKey fromKeyBytes(byte[] keyBytes) { in fromKeyBytes() argument
45 return new RebootEscrowKey(new SecretKeySpec(keyBytes, KEY_ALGO)); in fromKeyBytes()
H A DSP800Derive.java39 SP800Derive(byte[] keyBytes) { in SP800Derive() argument
40 mKeyBytes = keyBytes; in SP800Derive()
H A DSyntheticPasswordCrypto.java101 public static byte[] encrypt(byte[] keyBytes, byte[] personalization, byte[] message) { in encrypt() argument
102 byte[] keyHash = personalizedHash(personalization, keyBytes); in encrypt()
115 public static byte[] decrypt(byte[] keyBytes, byte[] personalization, byte[] ciphertext) { in decrypt() argument
116 byte[] keyHash = personalizedHash(personalization, keyBytes); in decrypt()
H A DLockSettingsService.java2571 public @Nullable String importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
2573 return mRecoverableKeyStoreManager.importKey(alias, keyBytes); in importKey()
2577 public @Nullable String importKeyWithMetadata(@NonNull String alias, @NonNull byte[] keyBytes, in importKeyWithMetadata() argument
2579 return mRecoverableKeyStoreManager.importKeyWithMetadata(alias, keyBytes, metadata); in importKeyWithMetadata()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
H A DRecoverableKeyGenerator.java144 @NonNull byte[] keyBytes, @Nullable byte[] metadata) in importKey() argument
146 SecretKey key = new SecretKeySpec(keyBytes, SECRET_KEY_ALGORITHM); in importKey()
H A DRecoverableKeyStoreManager.java783 public @Nullable String importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
785 return importKeyWithMetadata(alias, keyBytes, /*metadata=*/ null); in importKey()
800 public @Nullable String importKeyWithMetadata(@NonNull String alias, @NonNull byte[] keyBytes, in importKeyWithMetadata() argument
804 Objects.requireNonNull(keyBytes, "keyBytes is null"); in importKeyWithMetadata()
805 if (keyBytes.length != RecoverableKeyGenerator.KEY_SIZE_BITS / Byte.SIZE) { in importKeyWithMetadata()
828 mRecoverableKeyGenerator.importKey(encryptionKey, userId, uid, alias, keyBytes, in importKeyWithMetadata()
832 mApplicationKeyStorage.setSymmetricKeyEntry(userId, uid, alias, keyBytes); in importKeyWithMetadata()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
H A DTestData.java454 byte[] keyBytes = Base64.getDecoder().decode(INSECURE_PRIVATE_KEY_FOR_ENDPOINT1_BASE64); in getInsecurePrivateKeyForEndpoint1()
456 PKCS8EncodedKeySpec skSpec = new PKCS8EncodedKeySpec(keyBytes); in getInsecurePrivateKeyForEndpoint1()
/aosp14/frameworks/base/libs/securebox/tests/src/com/android/security/
H A DSecureBoxTest.java365 private static PrivateKey decodePrivateKey(byte[] keyBytes) throws Exception { in decodePrivateKey() argument
366 assertThat(keyBytes.length).isEqualTo(32); in decodePrivateKey()
367 BigInteger priv = new BigInteger(/*signum=*/ 1, keyBytes); in decodePrivateKey()
/aosp14/frameworks/base/core/java/android/security/keystore/recovery/
H A DRecoveryController.java627 public @NonNull Key importKey(@NonNull String alias, @NonNull byte[] keyBytes) in importKey() argument
630 String grantAlias = mBinder.importKey(alias, keyBytes); in importKey()
669 public @NonNull Key importKey(@NonNull String alias, @NonNull byte[] keyBytes, in importKey() argument
673 String grantAlias = mBinder.importKeyWithMetadata(alias, keyBytes, metadata); in importKey()
/aosp14/frameworks/base/core/java/com/android/internal/widget/
H A DILockSettings.aidl82 String importKey(String alias, in byte[] keyBytes); in importKey() argument
83 String importKeyWithMetadata(String alias, in byte[] keyBytes, in byte[] metadata); in importKeyWithMetadata() argument
/aosp14/frameworks/base/services/core/java/com/android/server/updates/
H A DCertificateTransparencyLogInstallReceiver.java158 byte[] keyBytes = Base64.decode(base64PublicKey, Base64.DEFAULT); in getLogFileName()
160 byte[] id = MessageDigest.getInstance("SHA-256").digest(keyBytes); in getLogFileName()
/aosp14/frameworks/base/packages/SettingsProvider/test/src/com/android/providers/settings/
H A DSettingsBackupAgentTest.java225 byte[] keyBytes = key.getBytes(); in generateBackupData()
227 buffer.putInt(keyBytes.length); in generateBackupData()
228 buffer.put(keyBytes); in generateBackupData()
/aosp14/frameworks/base/libs/securebox/src/com/android/security/
H A DSecureBox.java406 public static PublicKey decodePublicKey(byte[] keyBytes) in decodePublicKey() argument
411 Arrays.copyOfRange(keyBytes, 1, 1 + EC_COORDINATE_LEN_BYTES)); in decodePublicKey()
416 keyBytes, 1 + EC_COORDINATE_LEN_BYTES, EC_PUBLIC_KEY_LEN_BYTES)); in decodePublicKey()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/storage/
H A DRecoverableKeyStoreDb.java639 byte[] keyBytes = in getRecoveryServicePublicKey()
641 if (keyBytes == null) { in getRecoveryServicePublicKey()
645 return decodeX509Key(keyBytes); in getRecoveryServicePublicKey()
1396 private static PublicKey decodeX509Key(byte[] keyBytes) throws InvalidKeySpecException { in decodeX509Key() argument
1397 X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(keyBytes); in decodeX509Key()
/aosp14/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
H A DSettingsBackupAgent.java1066 final byte[] keyBytes = key.getBytes(); in extractRelevantValues()
1067 totalSize += INTEGER_BYTE_COUNT + keyBytes.length; in extractRelevantValues()
1068 values[backedUpSettingIndex * 2] = keyBytes; in extractRelevantValues()
H A DSettingsProvider.java2943 final byte[] keyBytes = new byte[32];
2945 rand.nextBytes(keyBytes);
2948 final String userKey = HexEncoding.encodeToString(keyBytes, true /* upperCase */);
2983 final byte[] keyBytes = HexEncoding.decode(userKey);
2987 if (keyBytes.length != 16 && keyBytes.length != 32) {
2994 m.init(new SecretKeySpec(keyBytes, m.getAlgorithm()));