Mercurial > hg > orthanc
comparison Core/Toolbox.cpp @ 3401:962e5f00744b
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Jun 2019 14:58:27 +0200 |
parents | a2862d4484f5 |
children | cbbe0bb80bd4 |
comparison
equal
deleted
inserted
replaced
3400:0faae6f6e3c5 | 3401:962e5f00744b |
---|---|
743 ComputeSHA1(result, NULL, 0); | 743 ComputeSHA1(result, NULL, 0); |
744 } | 744 } |
745 } | 745 } |
746 | 746 |
747 | 747 |
748 bool Toolbox::IsSHA1(const char* str, | 748 bool Toolbox::IsSHA1(const void* str, |
749 size_t size) | 749 size_t size) |
750 { | 750 { |
751 if (size == 0) | 751 if (size == 0) |
752 { | 752 { |
753 return false; | 753 return false; |
754 } | 754 } |
755 | 755 |
756 const char* start = str; | 756 const char* start = reinterpret_cast<const char*>(str); |
757 const char* end = str + size; | 757 const char* end = start + size; |
758 | 758 |
759 // Trim the beginning of the string | 759 // Trim the beginning of the string |
760 while (start < end) | 760 while (start < end) |
761 { | 761 { |
762 if (*start == '\0' || | 762 if (*start == '\0' || |