Export media_cas_proxy_sdk
This commit is contained in:
31
common/sha_util.h
Normal file
31
common/sha_util.h
Normal file
@@ -0,0 +1,31 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// 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_SHA_UTIL_H_
|
||||
#define COMMON_SHA_UTIL_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace widevine {
|
||||
|
||||
// Calculates SHA1 hash.
|
||||
std::string Sha1_Hash(const std::string& message);
|
||||
|
||||
// Calculates SHA256 hash.
|
||||
std::string Sha256_Hash(const std::string& message);
|
||||
|
||||
// Generates a UUID as specified in ITU-T X.667 ch. 14, SHA-1 name-based,
|
||||
// 16-byte binary representation. Name_space is a GUID prefix; name is a unique
|
||||
// name in the namespace.
|
||||
std::string GenerateSha1Uuid(const std::string& name_space, const std::string& name);
|
||||
|
||||
} // namespace widevine
|
||||
|
||||
#endif // COMMON_SHA_UTIL_H_
|
||||
Reference in New Issue
Block a user