1dc1ff7e7c988725d17afbcdfd7debe14caccb8a
The OEMCrypto tests have tests that verify that entitled keys can be loaded but not that they can be successfully used for decrypt. This patch adds a decrypt portion to the existing tests. As part of this, the existing Session::EncryptCTR() method and portions of Session::TestDecryptCTR() are lifted to be static functions so they can be shared across unrelated classes in oec_session_util.cpp. EncryptCTR() had no dependence on its enclosing class and is unchanged other than being moved outside the class. To reduce ambiguity with the new decrypt verification, this patch also renames EntitledMessage::VerifyEntitlementTestKeys() to the more-specific EntitledMessage::VerifyKCBs(). Its behavior is unchanged. Bug: 186782279
This is the OEMCrypto git repository. It is visible to Widevine partners, and contains documentation for OEMCrypto, as well as unit tests and reference code. Several versions of OEMCrypto are available on different branches. This is the only file on the master branch. Please use the git checkout command to work with the correct version of OEMCrypto, for example, to see version 14, use the command "git checkout origin/v14". Use "git branch -a" to see a list of all branches. Contact your Widevine TAM if you are unsure which branch you should use. The latest branch might have documentation without complete unit tests or sample code.
Description