26 lines
761 B
C++
26 lines
761 B
C++
////////////////////////////////////////////////////////////////////////////////
|
|
// 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_
|