Home
last modified time | relevance | path

Searched refs:cipher (Results 1 – 15 of 15) sorted by relevance

/aosp14/frameworks/base/services/core/java/com/android/server/accounts/
H A DCryptoHelper.java64 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in encryptBundle() local
65 cipher.init(Cipher.ENCRYPT_MODE, mEncryptionKey); in encryptBundle()
66 byte[] encryptedBytes = cipher.doFinal(clearBytes); in encryptBundle()
67 byte[] iv = cipher.getIV(); in encryptBundle()
90 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in decryptBundle() local
91 cipher.init(Cipher.DECRYPT_MODE, mEncryptionKey, ivSpec); in decryptBundle()
92 byte[] decryptedBytes = cipher.doFinal(encryptedBytes); in decryptBundle()
116 …private byte[] createMac(@NonNull byte[] cipher, @NonNull byte[] iv) throws GeneralSecurityExcepti… in createMac() argument
119 mac.update(cipher); in createMac()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
H A DWrappedKey.java72 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()
/aosp14/frameworks/base/services/core/java/com/android/server/locksettings/
H A DManagedProfilePasswordCache.java107 Cipher cipher; in storePassword() local
109 cipher = Cipher.getInstance("AES/GCM/NoPadding"); in storePassword()
110 cipher.init(Cipher.ENCRYPT_MODE, key); in storePassword()
111 byte[] ciphertext = cipher.doFinal(password.getCredential()); in storePassword()
112 byte[] iv = cipher.getIV(); in storePassword()
144 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in retrievePassword() local
145 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(128, iv)); in retrievePassword()
146 credential = cipher.doFinal(ciphertext); in retrievePassword()
H A DSyntheticPasswordCrypto.java71 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in decrypt() local
73 cipher.init(Cipher.DECRYPT_MODE, key, new GCMParameterSpec(AES_GCM_TAG_SIZE * 8, iv)); in decrypt()
74 return cipher.doFinal(ciphertext); in decrypt()
84 Cipher cipher = Cipher.getInstance( in encrypt() local
87 cipher.init(Cipher.ENCRYPT_MODE, key); in encrypt()
88 byte[] ciphertext = cipher.doFinal(blob); in encrypt()
89 byte[] iv = cipher.getIV(); in encrypt()
93 final GCMParameterSpec spec = cipher.getParameters().getParameterSpec( in encrypt()
H A DAesEncryptionUtil.java93 Cipher cipher = Cipher.getInstance(CIPHER_ALGO); in encrypt() local
94 cipher.init(Cipher.ENCRYPT_MODE, key); in encrypt()
95 cipherText = cipher.doFinal(plainText); in encrypt()
96 iv = cipher.getIV(); in encrypt()
H A DLockSettingsService.java1346 Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" in getDecryptedPasswordForTiedProfile() local
1349 cipher.init(Cipher.DECRYPT_MODE, decryptionKey, new GCMParameterSpec(128, iv)); in getDecryptedPasswordForTiedProfile()
1350 decryptionResult = cipher.doFinal(encryptedPassword); in getDecryptedPasswordForTiedProfile()
1960 Cipher cipher = Cipher.getInstance( in tieProfileLockToParent() local
1963 cipher.init(Cipher.ENCRYPT_MODE, keyStoreEncryptionKey); in tieProfileLockToParent()
1964 ciphertext = cipher.doFinal(password.getCredential()); in tieProfileLockToParent()
1965 iv = cipher.getIV(); in tieProfileLockToParent()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
H A DRecoverableKeyGeneratorTest.java130 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()
H A DWrappedKeyTest.java76 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata() local
77 cipher.init( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata()
81 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nullMetadata()
95 Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM); in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata() local
96 cipher.init( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
100 SecretKey unwrappedKey = (SecretKey) cipher.unwrap( in fromSecretKey_createsWrappedKeyThatCanBeUnwrapped_nonNullMetadata()
/aosp14/frameworks/base/libs/securebox/src/com/android/security/
H A DSecureBox.java347 Cipher cipher; in aesGcmInternal() local
349 cipher = Cipher.getInstance(ENC_ALG); in aesGcmInternal()
357 cipher.init(Cipher.DECRYPT_MODE, key, spec); in aesGcmInternal()
359 cipher.init(Cipher.ENCRYPT_MODE, key, spec); in aesGcmInternal()
366 cipher.updateAAD(aad); in aesGcmInternal()
367 return cipher.doFinal(text); in aesGcmInternal()
/aosp14/frameworks/base/core/java/android/hardware/biometrics/
H A DCryptoObject.java42 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
43 mCrypto = cipher; in CryptoObject()
H A DBiometricPrompt.java760 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
761 super(cipher); in CryptoObject()
/aosp14/frameworks/base/identity/java/android/security/identity/
H A DCredstoreIdentityCredential.java179 Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in encryptMessageToReader() local
181 cipher.init(Cipher.ENCRYPT_MODE, mSecretKey, encryptionParameterSpec); in encryptMessageToReader()
182 messageCiphertextAndAuthTag = cipher.doFinal(messagePlaintext); in encryptMessageToReader()
204 final Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); in decryptMessageFromReader() local
205 cipher.init(Cipher.DECRYPT_MODE, mReaderSecretKey, in decryptMessageFromReader()
207 plainText = cipher.doFinal(messageCiphertext); in decryptMessageFromReader()
/aosp14/system/core/fs_mgr/libdm/include/libdm/
H A Ddm_target.h253 DmTargetCrypt(uint64_t start, uint64_t length, const std::string& cipher, in DmTargetCrypt() argument
257 cipher_(cipher), in DmTargetCrypt()
286 DmTargetDefaultKey(uint64_t start, uint64_t length, const std::string& cipher, in DmTargetDefaultKey() argument
289 cipher_(cipher), in DmTargetDefaultKey()
/aosp14/frameworks/base/core/java/android/hardware/fingerprint/
H A DFingerprintManager.java264 public CryptoObject(@NonNull Cipher cipher) { in CryptoObject() argument
265 super(cipher); in CryptoObject()
/aosp14/frameworks/base/tools/aapt2/integration-tests/CommandTests/
H A Dandroid-33.jarAndroidManifest.xml META-INF/ META-INF/MANIFEST.MF NOTICES/ NOTICES/libcore ...