Home
last modified time | relevance | path

Searched refs:encryptedBytes (Results 1 – 12 of 12) sorted by relevance

/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunking/
DEncryptedChunk.java42 public static EncryptedChunk create(ChunkHash key, byte[] nonce, byte[] encryptedBytes) { in create() argument
45 return new EncryptedChunk(key, nonce, encryptedBytes); in create()
52 private EncryptedChunk(ChunkHash key, byte[] nonce, byte[] encryptedBytes) { in EncryptedChunk() argument
55 mEncryptedBytes = encryptedBytes; in EncryptedChunk()
69 public byte[] encryptedBytes() { in encryptedBytes() method in EncryptedChunk
DChunkEncryptor.java76 byte[] encryptedBytes; in encrypt()
78 encryptedBytes = cipher.doFinal(plaintext); in encrypt()
84 return EncryptedChunk.create(/*key=*/ plaintextHash, nonce, encryptedBytes); in encrypt()
DLengthlessEncryptedChunkEncoder.java39 writer.writeBytes(chunk.encryptedBytes()); in writeChunkToWriter()
44 return chunk.nonce().length + chunk.encryptedBytes().length; in getEncodedLengthOfChunk()
/frameworks/base/services/core/java/com/android/server/accounts/
DCryptoHelper.java66 byte[] encryptedBytes = cipher.doFinal(clearBytes); in encryptBundle()
68 byte[] mac = createMac(encryptedBytes, iv); in encryptBundle()
71 encryptedBundle.putByteArray(KEY_CIPHER, encryptedBytes); in encryptBundle()
82 byte[] encryptedBytes = bundle.getByteArray(KEY_CIPHER); in decryptBundle()
84 if (!verifyMac(encryptedBytes, iv, mac)) { in decryptBundle()
92 byte[] decryptedBytes = cipher.doFinal(encryptedBytes); in decryptBundle()
/frameworks/av/media/libstagefright/mpeg2ts/
DHlsSampleDecryptor.cpp181 size_t encryptedBytes = (remainingBytes / AES_BLOCK_SIZE) * AES_BLOCK_SIZE; in processAAC() local
187 status_t ret = decryptBlock(encrypted, encryptedBytes, AESInitVec); in processAAC()
193 offset += encryptedBytes; in processAAC()
194 remainingBytes -= encryptedBytes; in processAAC()
235 size_t encryptedBytes = (remainingBytes / AES_BLOCK_SIZE) * AES_BLOCK_SIZE; in processAC3() local
243 status_t ret = decryptBlock(encrypted, encryptedBytes, AESInitVec); in processAC3()
249 offset += encryptedBytes; in processAC3()
250 remainingBytes -= encryptedBytes; in processAC3()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/
DBackupFileBuilderTest.java118 TEST_CHUNK_1.encryptedBytes(), in writeChunks_nonIncremental_writesCorrectRawData()
120 TEST_CHUNK_2.encryptedBytes()); in writeChunks_nonIncremental_writesCorrectRawData()
138 TEST_CHUNK_1.encryptedBytes(), in writeChunks_nonIncrementalWithDuplicates_writesEachChunkOnlyOnce()
140 TEST_CHUNK_2.encryptedBytes()); in writeChunks_nonIncrementalWithDuplicates_writesEachChunkOnlyOnce()
162 TEST_CHUNK_1.encryptedBytes(), in writeChunks_incremental_writesParsableDiffScript()
164 TEST_CHUNK_2.encryptedBytes(), in writeChunks_incremental_writesParsableDiffScript()
166 TEST_CHUNK_3.encryptedBytes()); in writeChunks_incremental_writesParsableDiffScript()
188 TEST_CHUNK_1.encryptedBytes(), in writeChunks_incrementalWithDuplicates_writesEachChunkOnlyOnce()
190 TEST_CHUNK_2.encryptedBytes(), in writeChunks_incrementalWithDuplicates_writesEachChunkOnlyOnce()
192 TEST_CHUNK_3.encryptedBytes()); in writeChunks_incrementalWithDuplicates_writesEachChunkOnlyOnce()
[all …]
DChunkEncryptorTest.java134 assertThat(chunk1.encryptedBytes()).isNotEqualTo(chunk2.encryptedBytes()); in encrypt_whenInvokedAgain_generatesNewCiphertext()
154 byte[] decrypted = cipher.doFinal(chunk.encryptedBytes()); in encrypt_decryptedResultCorrespondsToPlaintext()
DEncryptedChunkTest.java68 byte[] returnedBytes = encryptedChunk.encryptedBytes(); in testEncryptedBytes_forNewlyCreatedObject_returnsCorrectValue()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/
DBackupStreamEncrypterTest.java82 totalSize += chunk.encryptedBytes().length; in testBackup_producesChunksOfTheGivenAverageSize()
98 assertThat(chunk.encryptedBytes().length) in testBackup_producesNoChunksSmallerThanMinSize()
109 assertThat(chunk.encryptedBytes().length) in testBackup_producesNoChunksLargerThanMaxSize()
123 size += chunksBySha256.get(byteString).encryptedBytes().length; in testBackup_producesAFileOfTheExpectedSize()
257 position += chunk.encryptedBytes().length - BYTES_OVERHEAD_PER_CHUNK; in positionOfChunk()
DBackupFileDecryptorTaskTest.java449 dos.write(chunk.encryptedBytes()); in createEncryptedFileUsingExplicitStarts()
450 position += chunk.nonce().length + chunk.encryptedBytes().length; in createEncryptedFileUsingExplicitStarts()
498 dos.writeInt(chunk.nonce().length + chunk.encryptedBytes().length); in createEncryptedFileUsingInlineLengths()
500 dos.write(chunk.encryptedBytes()); in createEncryptedFileUsingInlineLengths()
556 byte[] encryptedBytes = cipher.doFinal(nanoBytes); in encrypt()
560 out.write(encryptedBytes); in encrypt()
DKvBackupEncrypterTest.java284 byte[] decryptedBytes = cipher.doFinal(encryptedChunk.encryptedBytes()); in decryptChunk()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DWifiCarrierInfoManager.java594 byte[] encryptedBytes = cipher.doFinal(data); in encryptDataUsingPublicKey()
596 return Base64.encodeToString(encryptedBytes, 0, encryptedBytes.length, encodingFlag); in encryptDataUsingPublicKey()