Files
android/libwvdrmengine/src/WVUUID.cpp
Robert Shih 8fce3e316b wv hidl: upgrade Drm/Crypto factories to v1.3
Bug: 139134043
Test: MediaDrmTest
Change-Id: I94d1cc8a323c144805d74d5568944dd48ae80e60
2019-12-16 01:19:49 -08:00

38 lines
857 B
C++

//
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// License Agreement.
//
#include "WVUUID.h"
#include <array>
#include <cstring>
namespace wvdrm {
namespace {
const std::array<uint8_t, 16> kWidevineUUID = {
0xED,0xEF,0x8B,0xA9,0x79,0xD6,0x4A,0xCE,
0xA3,0xC8,0x27,0xDC,0xD5,0x1D,0x21,0xED
};
const std::array<uint8_t, 16> kOldNetflixWidevineUUID = {
0x29,0x70,0x1F,0xE4,0x3C,0xC7,0x4A,0x34,
0x8C,0x5B,0xAE,0x90,0xC7,0x43,0x9A,0x47
};
}
bool isWidevineUUID(const uint8_t uuid[16]) {
return !memcmp(uuid, kWidevineUUID.data(), 16) ||
!memcmp(uuid, kOldNetflixWidevineUUID.data(), 16);
}
std::vector<std::array<uint8_t, 16>> getSupportedCryptoSchemes() {
return {kWidevineUUID, kOldNetflixWidevineUUID};
}
} // namespace wvdrm