Clear Content Copy

Copy from Widevine repository of http://go/wvgerrit/13841

This CL adds a nonblocking CopyBuffer to OEMCrypto, its unit tests,
and plumbs it up to the cdm CryptoSession and CdmEngine.

b/19543782

Change-Id: I4c88bd2f8d7f67ecccb549c1934b7c0da15a8429
This commit is contained in:
Fred Gylys-Colwell
2015-03-31 09:15:38 -07:00
parent 582eb32661
commit a7d2f57bfb
7 changed files with 150 additions and 64 deletions

View File

@@ -20,12 +20,6 @@
namespace wvoec_mock {
enum BufferType {
kBufferTypeClear,
kBufferTypeSecure,
kBufferTypeDirect
};
class SessionContext;
class CryptoEngine;
class UsageTable;
@@ -117,7 +111,8 @@ class SessionContext {
OEMCryptoResult DecryptCTR(const uint8_t* iv, size_t block_offset,
const uint8_t* cipher_data,
size_t cipher_data_length, bool is_encrypted,
uint8_t* clear_data, BufferType buffer_type);
uint8_t* clear_data,
OEMCryptoBufferType buffer_type);
OEMCryptoResult Generic_Encrypt(const uint8_t* in_buffer,
size_t buffer_length, const uint8_t* iv,