20 #ifndef SHA1_HPP_XJADWV5G
21 #define SHA1_HPP_XJADWV5G
34 USCXML_API
inline std::string sha1(
const char* data,
size_t length) {
37 SHA1Input(&sha, (
const unsigned char*)data, length);
38 if (!SHA1Result(&sha)) {
41 std::ostringstream ss;
42 ss << std::hex << std::uppercase << std::setfill(
'0' );
43 for (
size_t i = 0; i < 5; i++) {
44 ss << std::setw( 2 ) << sha.Message_Digest[i];
51 USCXML_API
inline std::string sha1(
const std::string& data) {
52 return sha1(data.data(), data.size());
Definition: InterpreterIssue.cpp:33