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

/frameworks/av/media/libstagefright/mpeg2ts/
H A DHlsSampleDecryptor.cpp51 if (keyDataBuffer != NULL && keyDataBuffer->size() == AES_BLOCK_SIZE &&
52 initVecBuffer != NULL && initVecBuffer->size() == AES_BLOCK_SIZE) {
58 uint8_t KeyData[AES_BLOCK_SIZE];
59 memcpy(KeyData, keyDataBuffer->data(), AES_BLOCK_SIZE);
60 memcpy(mAESInitVec, initVecBuffer->data(), AES_BLOCK_SIZE);
62 mValidKeyInfo = (AES_set_decrypt_key(KeyData, 8*AES_BLOCK_SIZE/*128*/, &mAesKey) == 0);
87 bool isEncrypted = (nalSize > VIDEO_CLEAR_LEAD + AES_BLOCK_SIZE);
113 unsigned char AESInitVec[AES_BLOCK_SIZE];
114 memcpy(AESInitVec, mAESInitVec, AES_BLOCK_SIZE);
118 if (remainingBytes > AES_BLOCK_SIZE) {
[all...]
H A DHlsSampleDecryptor.h44 static AString aesBlockToStr(uint8_t block[AES_BLOCK_SIZE]);
49 status_t decryptBlock(uint8_t *buffer, size_t size, uint8_t AESInitVec[AES_BLOCK_SIZE]);
55 uint8_t mAESInitVec[AES_BLOCK_SIZE];
/frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/common/
H A DFwdLockGlue.c115 size_t padding = AES_BLOCK_SIZE - (decryptedKeyLength % AES_BLOCK_SIZE);
145 return ((plaintextKeyLength / AES_BLOCK_SIZE) + 2) * AES_BLOCK_SIZE;
155 unsigned char initVector[AES_BLOCK_SIZE];
156 if (FwdLockGlue_GetRandomNumber(initVector, AES_BLOCK_SIZE)) {
157 size_t padding = AES_BLOCK_SIZE - (plaintextKeyLength % AES_BLOCK_SIZE);
158 size_t dataLength = encryptedKeyLength - AES_BLOCK_SIZE;
161 memcpy((unsigned char *)pEncryptedKey + dataLength, initVector, AES_BLOCK_SIZE);
182 memcpy(initVector, (const unsigned char *)pEncryptedKey + dataLength, AES_BLOCK_SIZE); local
[all...]
/frameworks/av/drm/mediadrm/plugins/clearkey/
H A DClearKeyTypes.h27 const uint8_t kBlockSize = AES_BLOCK_SIZE;
/frameworks/av/drm/mediacas/plugins/clearkey/
H A DClearKeyCasPlugin.cpp218 CHECK(length >= AES_BLOCK_SIZE);
224 unsigned char iv[AES_BLOCK_SIZE];
225 memset(iv, 0, AES_BLOCK_SIZE);
228 int cts_byte_count = length % AES_BLOCK_SIZE;
243 int cbc_byte_count = length - cts_byte_count - AES_BLOCK_SIZE;
251 unsigned char block_n[AES_BLOCK_SIZE];
252 memset(block_n, 0, AES_BLOCK_SIZE);
253 memcpy(block_n, data + AES_BLOCK_SIZE, cts_byte_count);
257 AES_cbc_encrypt(data, data, AES_BLOCK_SIZE, &key, block_n, 0);
263 *(data + i) = *(data + AES_BLOCK_SIZE
[all...]
/frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/decoder/
H A DFwdLockFile.c41 #define KEY_SIZE AES_BLOCK_SIZE
71 unsigned char keyStream[AES_BLOCK_SIZE];
232 for (; i < AES_BLOCK_SIZE; ++i) {
246 uint64_t blockIndex = pSession->filePos / AES_BLOCK_SIZE;
247 uint64_t blockOffset = pSession->filePos % AES_BLOCK_SIZE;
250 unsigned char counter[AES_BLOCK_SIZE];
/frameworks/av/media/libstagefright/httplive/
H A DPlaylistFetcher.h179 unsigned char mAESInitVec[AES_BLOCK_SIZE];
180 unsigned char mKeyData[AES_BLOCK_SIZE];
H A DPlaylistFetcher.cpp367 unsigned char AESInitVec[AES_BLOCK_SIZE];
401 bool newKey = memcmp(mKeyData, key->data(), AES_BLOCK_SIZE) != 0;
402 bool newInitVec = memcmp(mAESInitVec, AESInitVec, AES_BLOCK_SIZE) != 0;
408 memcpy(mKeyData, key->data(), AES_BLOCK_SIZE);
409 memcpy(mAESInitVec, AESInitVec, AES_BLOCK_SIZE);
/frameworks/av/drm/libdrmframework/plugins/forward-lock/internal-format/converter/
H A 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))
845 if (++pSession->keyStreamIndex == AES_BLOCK_SIZE) {
1122 if (pSession->encryptedSessionKeyLength < AES_BLOCK_SIZE) {
1142 memcpy(pSession->counter, pSession->pEncryptedSessionKey, AES_BLOCK_SIZE);

Completed in 157 milliseconds