Files
android/libwvdrmengine/cdm/core/include/device_files.h
Jeff Tinker 63c597d330 Update path to Widevine MediaDrm engine credentials
Use separate directories for unit test-generated
credentials vs actual credentials, so the unit test
credentials don't interfere with the real ones.

related-to-bug: 8620943

Merge of:

Update path to where CDM persistently stores data
https://widevine-internal-review.googlesource.com/#/c/5300/

Rename Keybox File
https://widevine-internal-review.googlesource.com/#/c/5240/

... from the widevine CDM repo.

Change-Id: Idefa484b3a2f71f723238f033460bf431ce4209b
2013-04-25 14:12:11 -07:00

33 lines
948 B
C++

// Copyright 2013 Google Inc. All Rights Reserved.
//
#ifndef CDM_BASE_DEVICE_FILES_H_
#define CDM_BASE_DEVICE_FILES_H_
#include "wv_cdm_types.h"
namespace wvcdm {
class DeviceFiles {
public:
static bool StoreCertificate(const std::string& certificate,
const std::string& wrapped_private_key);
static bool RetrieveCertificate(std::string* certificate,
std::string* wrapped_private_key);
static std::string GetBasePath(const char* dir);
static const char* kBasePath;
static const char* kPathDelimiter;
static const char* kDeviceCertificateFileName;
private:
static bool Hash(const std::string& data, std::string* hash);
static bool StoreFile(const char* name, const std::string& data);
static bool RetrieveFile(const char* name, std::string* data);
CORE_DISALLOW_COPY_AND_ASSIGN(DeviceFiles);
}; // namespace wvcdm
}
#endif // CDM_BASE_DEVICE_FILES_H_