Home
last modified time | relevance | path

Searched refs:AES_BLOCK_SIZE (Results 1 – 9 of 9) sorted by relevance

/frameworks/av/media/libstagefright/mpeg2ts/
DHlsSampleDecryptor.cpp51 if (keyDataBuffer != NULL && keyDataBuffer->size() == AES_BLOCK_SIZE && in signalNewSampleAesKey()
52 initVecBuffer != NULL && initVecBuffer->size() == AES_BLOCK_SIZE) { in signalNewSampleAesKey()
58 uint8_t KeyData[AES_BLOCK_SIZE]; in signalNewSampleAesKey()
59 memcpy(KeyData, keyDataBuffer->data(), AES_BLOCK_SIZE); in signalNewSampleAesKey()
60 memcpy(mAESInitVec, initVecBuffer->data(), AES_BLOCK_SIZE); in signalNewSampleAesKey()
62 mValidKeyInfo = (AES_set_decrypt_key(KeyData, 8*AES_BLOCK_SIZE/*128*/, &mAesKey) == 0); in signalNewSampleAesKey()
87 bool isEncrypted = (nalSize > VIDEO_CLEAR_LEAD + AES_BLOCK_SIZE); in processNal()
113 unsigned char AESInitVec[AES_BLOCK_SIZE]; in processNal()
114 memcpy(AESInitVec, mAESInitVec, AES_BLOCK_SIZE); in processNal()
118 if (remainingBytes > AES_BLOCK_SIZE) { in processNal()
[all …]
DHlsSampleDecryptor.h46 static AString aesBlockToStr(uint8_t block[AES_BLOCK_SIZE]);
51 status_t decryptBlock(uint8_t *buffer, size_t size, uint8_t AESInitVec[AES_BLOCK_SIZE]);
57 uint8_t mAESInitVec[AES_BLOCK_SIZE];
/frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/common/
DFwdLockGlue.c115 size_t padding = AES_BLOCK_SIZE - (decryptedKeyLength % AES_BLOCK_SIZE); in FwdLockGlue_ValidatePadding()
145 return ((plaintextKeyLength / AES_BLOCK_SIZE) + 2) * AES_BLOCK_SIZE; in FwdLockGlue_GetEncryptedKeyLength()
155 unsigned char initVector[AES_BLOCK_SIZE]; in FwdLockGlue_EncryptKey()
156 if (FwdLockGlue_GetRandomNumber(initVector, AES_BLOCK_SIZE)) { in FwdLockGlue_EncryptKey()
157 size_t padding = AES_BLOCK_SIZE - (plaintextKeyLength % AES_BLOCK_SIZE); in FwdLockGlue_EncryptKey()
158 size_t dataLength = encryptedKeyLength - AES_BLOCK_SIZE; in FwdLockGlue_EncryptKey()
161 memcpy((unsigned char *)pEncryptedKey + dataLength, initVector, AES_BLOCK_SIZE); in FwdLockGlue_EncryptKey()
177 size_t dataLength = encryptedKeyLength - AES_BLOCK_SIZE; in FwdLockGlue_DecryptKey()
180 unsigned char initVector[AES_BLOCK_SIZE]; in FwdLockGlue_DecryptKey()
182 memcpy(initVector, (const unsigned char *)pEncryptedKey + dataLength, AES_BLOCK_SIZE); in FwdLockGlue_DecryptKey()
/frameworks/av/drm/mediacas/plugins/clearkey/
DClearKeyCasPlugin.cpp277 CHECK(length >= AES_BLOCK_SIZE); in TpBlockCtsDecrypt()
283 unsigned char iv[AES_BLOCK_SIZE]; in TpBlockCtsDecrypt()
284 memset(iv, 0, AES_BLOCK_SIZE); in TpBlockCtsDecrypt()
287 int cts_byte_count = length % AES_BLOCK_SIZE; in TpBlockCtsDecrypt()
302 int cbc_byte_count = length - cts_byte_count - AES_BLOCK_SIZE; in TpBlockCtsDecrypt()
310 unsigned char block_n[AES_BLOCK_SIZE]; in TpBlockCtsDecrypt()
311 memset(block_n, 0, AES_BLOCK_SIZE); in TpBlockCtsDecrypt()
312 memcpy(block_n, data + AES_BLOCK_SIZE, cts_byte_count); in TpBlockCtsDecrypt()
316 AES_cbc_encrypt(data, data, AES_BLOCK_SIZE, &key, block_n, 0); in TpBlockCtsDecrypt()
322 *(data + i) = *(data + AES_BLOCK_SIZE + i); in TpBlockCtsDecrypt()
[all …]
/frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/
DFwdLockFile.c41 #define KEY_SIZE AES_BLOCK_SIZE
71 unsigned char keyStream[AES_BLOCK_SIZE];
232 for (; i < AES_BLOCK_SIZE; ++i) { in FwdLockFile_CalculateCounter()
246 uint64_t blockIndex = pSession->filePos / AES_BLOCK_SIZE; in FwdLockFile_DecryptByte()
247 uint64_t blockOffset = pSession->filePos % AES_BLOCK_SIZE; in FwdLockFile_DecryptByte()
250 unsigned char counter[AES_BLOCK_SIZE]; in FwdLockFile_DecryptByte()
/frameworks/av/drm/mediadrm/plugins/clearkey/default/include/
DClearKeyTypes.h27 const uint8_t kBlockSize = AES_BLOCK_SIZE;
/frameworks/av/media/libstagefright/httplive/
DPlaylistFetcher.h180 unsigned char mAESInitVec[AES_BLOCK_SIZE];
181 unsigned char mKeyData[AES_BLOCK_SIZE];
DPlaylistFetcher.cpp384 unsigned char AESInitVec[AES_BLOCK_SIZE]; in decryptBuffer()
418 bool newKey = memcmp(mKeyData, key->data(), AES_BLOCK_SIZE) != 0; in decryptBuffer()
419 bool newInitVec = memcmp(mAESInitVec, AESInitVec, AES_BLOCK_SIZE) != 0; in decryptBuffer()
425 memcpy(mKeyData, key->data(), AES_BLOCK_SIZE); in decryptBuffer()
426 memcpy(mAESInitVec, AESInitVec, AES_BLOCK_SIZE); in decryptBuffer()
/frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/converter/
DFwdLockConv.c47 #define KEY_SIZE AES_BLOCK_SIZE
150 unsigned char counter[AES_BLOCK_SIZE];
151 unsigned char keyStream[AES_BLOCK_SIZE];
820 while ((++pSession->counter[i] == 0) && (++i < AES_BLOCK_SIZE)) in FwdLockConv_IncrementCounter()
845 if (++pSession->keyStreamIndex == AES_BLOCK_SIZE) { in FwdLockConv_WriteEncryptedChar()
1122 if (pSession->encryptedSessionKeyLength < AES_BLOCK_SIZE) { in FwdLockConv_OpenSession()
1142 memcpy(pSession->counter, pSession->pEncryptedSessionKey, AES_BLOCK_SIZE); in FwdLockConv_OpenSession()