Increment IV in WVCryptoPlugin

WVCryptoPlugin was not properly implementing part of its responsibilities to
AES-CTR in ISO-CENC.  Specifically, it was not incrementing the IV after each
block.

Also, I have greatly expanded the unit tests for decrypt() to catch more edge
cases.

This change fixes the two failing test vectors in the Java integration tests.

Copied from https://widevine-internal-review.googlesource.com/#/c/5123/2

Bug: 8656421
Change-Id: If935edbf01068f5b0d5254b4e657057ef57d8fcf
This commit is contained in:
John "Juce" Bruce
2013-04-22 14:00:46 -07:00
parent bb0c62768a
commit 088288cb76
3 changed files with 91 additions and 39 deletions

View File

@@ -36,6 +36,7 @@ class WVCryptoPlugin : public android::CryptoPlugin {
const wvcdm::CdmSessionId mSessionId;
wvcdm::CdmSessionId configureTestMode(const void* data, size_t size);
static void incrementIV(uint64_t increaseBy, std::vector<uint8_t>* ivPtr);
};
} // namespace wvdrm