/frameworks/base/services/core/java/com/android/server/accounts/ |
D | CryptoHelper.java | 63 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encryptBundle() local 64 cipher.init(Cipher.ENCRYPT_MODE, mEncryptionKey); in encryptBundle() 65 byte[] encryptedBytes = cipher.doFinal(clearBytes); in encryptBundle() 66 byte[] iv = cipher.getIV(); in encryptBundle() 89 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptBundle() local 90 cipher.init(Cipher.DECRYPT_MODE, mEncryptionKey, ivSpec); in decryptBundle() 91 byte[] decryptedBytes = cipher.doFinal(encryptedBytes); in decryptBundle() 115 …private byte[] createMac(@NonNull byte[] cipher, @NonNull byte[] iv) throws GeneralSecurityExcepti… in createMac() argument 118 mac.update(cipher); in createMac()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
D | WrappedKey.java | 72 Cipher cipher; in fromSecretKey() local 74 cipher = Cipher.getInstance(KEY_WRAP_CIPHER_ALGORITHM); in fromSecretKey() 80 cipher.init(Cipher.WRAP_MODE, wrappingKey.getKey()); in fromSecretKey() 83 encryptedKeyMaterial = cipher.wrap(key); in fromSecretKey() 101 /*nonce=*/ cipher.getIV(), in fromSecretKey() 206 Cipher cipher = Cipher.getInstance(KEY_WRAP_CIPHER_ALGORITHM); in unwrapKeys() local 221 cipher.init( in unwrapKeys() 227 key = (SecretKey) cipher.unwrap( in unwrapKeys()
|
D | SecureBox.java | 343 Cipher cipher; in aesGcmInternal() local 345 cipher = Cipher.getInstance(ENC_ALG); in aesGcmInternal() 353 cipher.init(Cipher.DECRYPT_MODE, key, spec); in aesGcmInternal() 355 cipher.init(Cipher.ENCRYPT_MODE, key, spec); in aesGcmInternal() 362 cipher.updateAAD(aad); in aesGcmInternal() 363 return cipher.doFinal(text); in aesGcmInternal()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | WifiConfigStoreEncryptionUtil.java | 87 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt() local 90 cipher.init(Cipher.ENCRYPT_MODE, secretKeyReference); in encrypt() 91 encryptedData = new EncryptedData(cipher.doFinal(data), cipher.getIV()); in encrypt() 119 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decrypt() local 123 cipher.init(Cipher.DECRYPT_MODE, secretKeyReference, spec); in decrypt() 124 decryptedData = cipher.doFinal(encryptedData.getEncryptedData()); in decrypt()
|
D | InformationElementUtil.java | 532 private static int parseWpaCipher(int cipher) { in parseWpaCipher() argument 533 switch (cipher) { in parseWpaCipher() 542 + Integer.toHexString(cipher)); in parseWpaCipher() 547 private static int parseRsnCipher(int cipher) { in parseRsnCipher() argument 548 switch (cipher) { in parseRsnCipher() 561 + Integer.toHexString(cipher)); in parseRsnCipher() 778 private String cipherToString(int cipher) { in cipherToString() argument 779 switch (cipher) { in cipherToString()
|
D | TelephonyUtil.java | 185 Cipher cipher = Cipher.getInstance(IMSI_CIPHER_TRANSFORMATION); in encryptDataUsingPublicKey() local 186 cipher.init(Cipher.ENCRYPT_MODE, key); in encryptDataUsingPublicKey() 187 byte[] encryptedBytes = cipher.doFinal(data); in encryptDataUsingPublicKey()
|
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/ |
D | ChunkEncryptor.java | 61 Cipher cipher; in encrypt() local 63 cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt() 64 cipher.init( in encrypt() 76 encryptedBytes = cipher.doFinal(plaintext); in encrypt()
|
/frameworks/base/services/core/java/com/android/server/locksettings/ |
D | SyntheticPasswordCrypto.java | 63 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt() local 65 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(DEFAULT_TAG_LENGTH_BITS, iv)); in decrypt() 66 return cipher.doFinal(ciphertext); in decrypt() 76 Cipher cipher = Cipher.getInstance( in encrypt() local 79 cipher.init(Cipher.ENCRYPT_MODE, key); in encrypt() 80 byte[] ciphertext = cipher.doFinal(blob); in encrypt() 81 byte[] iv = cipher.getIV(); in encrypt() 85 final GCMParameterSpec spec = cipher.getParameters().getParameterSpec( in encrypt()
|
D | LockSettingsService.java | 1179 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in getDecryptedPasswordForTiedProfile() local 1182 cipher.init(Cipher.DECRYPT_MODE, decryptionKey, new GCMParameterSpec(128, iv)); in getDecryptedPasswordForTiedProfile() 1183 decryptionResult = cipher.doFinal(encryptedPassword); in getDecryptedPasswordForTiedProfile() 1619 Cipher cipher = Cipher.getInstance( in tieProfileLockToParent() local 1622 cipher.init(Cipher.ENCRYPT_MODE, keyStoreEncryptionKey); in tieProfileLockToParent() 1623 encryptionResult = cipher.doFinal(password); in tieProfileLockToParent() 1624 iv = cipher.getIV(); in tieProfileLockToParent()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | RecoverableKeyGeneratorTest.java | 130 Cipher cipher = Cipher.getInstance(KEY_WRAP_ALGORITHM); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() local 131 cipher.init(Cipher.DECRYPT_MODE, mDecryptKey.getKey(), in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 133 byte[] unwrappedMaterial = cipher.doFinal(wrappedKey.getKeyMaterial()); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial() 164 Cipher cipher = Cipher.getInstance(KEY_WRAP_ALGORITHM); in importKey_storesTheWrappedVersionOfTheRawMaterial() local 165 cipher.init(Cipher.DECRYPT_MODE, mDecryptKey.getKey(), in importKey_storesTheWrappedVersionOfTheRawMaterial() 167 byte[] unwrappedMaterial = cipher.doFinal(wrappedKey.getKeyMaterial()); in importKey_storesTheWrappedVersionOfTheRawMaterial()
|
D | WrappedKeyTest.java | 77 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() local 78 cipher.init( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 82 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() 96 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() local 97 cipher.init( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() 101 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
|
/frameworks/base/core/java/android/hardware/biometrics/ |
D | CryptoObject.java | 41 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument 42 mCrypto = cipher; in CryptoObject()
|
D | BiometricPrompt.java | 397 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument 398 super(cipher); in CryptoObject()
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/ |
D | ChunkEncryptorTest.java | 149 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encrypt_decryptedResultCorrespondsToPlaintext() local 150 cipher.init( in encrypt_decryptedResultCorrespondsToPlaintext() 154 byte[] decrypted = cipher.doFinal(chunk.encryptedBytes()); in encrypt_decryptedResultCorrespondsToPlaintext()
|
/frameworks/base/identity/java/android/security/identity/ |
D | CredstoreIdentityCredential.java | 171 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in encryptMessageToReader() local 173 cipher.init(Cipher.ENCRYPT_MODE, mSecretKey, encryptionParameterSpec); in encryptMessageToReader() 174 messageCiphertextAndAuthTag = cipher.doFinal(messagePlaintext); in encryptMessageToReader() 196 final Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in decryptMessageFromReader() local 197 cipher.init(Cipher.DECRYPT_MODE, mReaderSecretKey, in decryptMessageFromReader() 199 plainText = cipher.doFinal(messageCiphertext); in decryptMessageFromReader()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | TelephonyUtilTest.java | 136 Cipher cipher = mock(Cipher.class); in getEncryptedIdentity_WithRfc4648() local 150 when(Cipher.getInstance(anyString())).thenReturn(cipher); in getEncryptedIdentity_WithRfc4648() 151 when(cipher.doFinal(any(byte[].class))).thenReturn(permanentIdentity.getBytes()); in getEncryptedIdentity_WithRfc4648() 177 Cipher cipher = mock(Cipher.class); in getEncryptedIdentityFailed() local 184 when(Cipher.getInstance(anyString())).thenReturn(cipher); in getEncryptedIdentityFailed() 185 when(cipher.doFinal(any(byte[].class))).thenThrow(BadPaddingException.class); in getEncryptedIdentityFailed()
|
/frameworks/base/core/java/android/hardware/fingerprint/ |
D | FingerprintManager.java | 121 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument 122 super(cipher); in CryptoObject()
|
/frameworks/base/config/ |
D | hiddenapi-greylist-max-o.txt | 106162 Ljava/security/Signature$CipherAdapter;->cipher:Ljavax/crypto/Cipher; 112188 Ljavax/crypto/CipherInputStream;->cipher:Ljavax/crypto/Cipher; 112197 Ljavax/crypto/CipherOutputStream;->cipher:Ljavax/crypto/Cipher;
|