Refactor OEMCrypto_SetDecryptHash
The current implementation of OEMCrypto_SetDecryptHash gives developers flexibility to use different types of hashes. However, all the implementations we have seen thus far use crc32. Because of this, crc32 should be sufficient and we can refactor OEMCrypto_SetDecryptHash to only use the crc32 hash. Bug: 287706586 Change-Id: I4aaa253b2656dfd9c984f77dfb08fe160b23b47c
This commit is contained in:
@@ -386,11 +386,9 @@ class OEMCryptoSessionTestsDecryptTests
|
||||
if (verify_crc_) {
|
||||
const TestSample& sample = samples_[0];
|
||||
|
||||
uint32_t hash =
|
||||
uint32_t crc32 =
|
||||
util::wvcrc32(sample.truth_buffer.data(), sample.truth_buffer.size());
|
||||
OEMCrypto_SetDecryptHash(session_.session_id(), 1,
|
||||
reinterpret_cast<const uint8_t*>(&hash),
|
||||
sizeof(hash));
|
||||
OEMCrypto_SetDecryptHash(session_.session_id(), 1, crc32);
|
||||
}
|
||||
|
||||
// Build an array of just the sample descriptions.
|
||||
|
||||
Reference in New Issue
Block a user