Remove OEMCrypto_InitializeDecryptHash

Merge from Widevine repo of http://go/wvgerrit/68464

The Full Decrypt Path Testing design has changed to remove
OEMCrypto_InitializeDecryptHash.  This CL updates the unit tests and
reference code.

Bug: 120795057
Test: unit tests

Change-Id: Iee28fa9034dc21cee81c5b894c192e260375eeee
This commit is contained in:
Fred Gylys-Colwell
2018-12-13 14:08:45 -08:00
committed by Srujan Gaddam
parent f42038d89a
commit 9c95e4caae
5 changed files with 55 additions and 92 deletions

View File

@@ -535,7 +535,7 @@ OEMCRYPTO_API OEMCryptoResult OEMCrypto_DecryptCENC(
OEMCryptoResult result = session_ctx->DecryptCENC(
iv, block_offset, pattern, data_addr, data_length, is_encrypted,
crypto_engine->destination(), out_buffer->type);
crypto_engine->destination(), out_buffer->type, subsample_flags);
if (result != OEMCrypto_SUCCESS) return result;
return crypto_engine->PushDestination(out_buffer, subsample_flags);
}
@@ -1621,20 +1621,6 @@ OEMCRYPTO_API uint32_t OEMCrypto_SupportsDecryptHash() {
return OEMCrypto_CRC_Clear_Buffer;
}
OEMCRYPTO_API OEMCryptoResult OEMCrypto_InitializeDecryptHash(
OEMCrypto_SESSION session) {
if (!crypto_engine) {
LOGE("OEMCrypto_InitializeDecryptHash: OEMCrypto Not Initialized.");
return OEMCrypto_ERROR_UNKNOWN_FAILURE;
}
SessionContext* session_ctx = crypto_engine->FindSession(session);
if (!session_ctx || !session_ctx->isValid()) {
LOGE("[OEMCrypto_InitializeDecryptHash(): ERROR_INVALID_SESSION]");
return OEMCrypto_ERROR_INVALID_SESSION;
}
return session_ctx->InitializeDecryptHash();
}
OEMCRYPTO_API OEMCryptoResult OEMCrypto_SetDecryptHash(
OEMCrypto_SESSION session, uint32_t frame_number, const uint8_t* hash,
size_t hash_length) {