Update unit tests for v15.2
Merge from Widevine repo of http://go/wvgerrit/77609 For v15.2 we require that nonces not collide across sessions and there are restrictions placed on the mac key's IV in LoadKeys. Test: ran unit tests on reference code Bug: 131325434 Bug: 131326334 Change-Id: I1bb01c30d8c15d66d762c28b57d7700c44daa835
This commit is contained in:
@@ -13,7 +13,7 @@ namespace wvoec_ref {
|
||||
|
||||
class NonceTable {
|
||||
public:
|
||||
static const int kTableSize = 16;
|
||||
static const int kTableSize = 4;
|
||||
NonceTable() {
|
||||
for (int i = 0; i < kTableSize; ++i) {
|
||||
state_[i] = kNTStateInvalid;
|
||||
@@ -22,6 +22,8 @@ class NonceTable {
|
||||
~NonceTable() {}
|
||||
void AddNonce(uint32_t nonce);
|
||||
bool CheckNonce(uint32_t nonce);
|
||||
// Verify that the nonce is not the same as any in this table.
|
||||
bool NonceCollision(uint32_t nonce) const;
|
||||
void Flush();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user