//////////////////////////////////////////////////////////////////////////////// // 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 #include namespace widevine { // Calculates SHA1 hash. std::string Sha1_Hash(const std::string& message); // Calculates SHA256 hash. std::string Sha256_Hash(const std::string& message); // Calculate SHA512 hash. std::string Sha512_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_