Export media_cas_packager_sdk
This commit is contained in:
25
common/random_util.h
Normal file
25
common/random_util.h
Normal file
@@ -0,0 +1,25 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2016 Google LLC.
|
||||
//
|
||||
// This software is licensed under the terms defined in the Widevine Master
|
||||
// License Agreement. For a copy of this agreement, please contact
|
||||
// widevine-licensing@google.com.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef COMMON_RANDOM_UTIL_H_
|
||||
#define COMMON_RANDOM_UTIL_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace widevine {
|
||||
|
||||
// Generates a random string.
|
||||
// Returns true on success, false otherwise.
|
||||
bool RandomBytes(size_t num_bytes, std::string* output);
|
||||
|
||||
// Returns a 16-byte std::string suitable for use as an AES key
|
||||
std::string Random16Bytes();
|
||||
|
||||
} // namespace widevine
|
||||
|
||||
#endif // COMMON_RANDOM_UTIL_H_
|
||||
Reference in New Issue
Block a user