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:
@@ -599,11 +599,10 @@ TEST_F(OEMCryptoSessionTests,
|
||||
TEST_F(OEMCryptoMemoryLicenseTest,
|
||||
OEMCryptoMemoryDecryptHashForHugeHashBuffer) {
|
||||
uint32_t session_id = session_.session_id();
|
||||
auto f = [session_id](size_t hash_length) {
|
||||
uint32_t frame_number = 1;
|
||||
vector<uint8_t> hash_buffer(hash_length);
|
||||
return OEMCrypto_SetDecryptHash(session_id, frame_number,
|
||||
hash_buffer.data(), hash_buffer.size());
|
||||
auto f = [session_id]() {
|
||||
const uint32_t frame_number = 1;
|
||||
const uint32_t crc32 = 0;
|
||||
return OEMCrypto_SetDecryptHash(session_id, frame_number, crc32);
|
||||
};
|
||||
TestHugeLengthDoesNotCrashAPI(f, kCheckStatus);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user