We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ed0202d + ea9c775 commit 0a45b37Copy full SHA for 0a45b37
1 file changed
src/utils/sha1.h
@@ -60,14 +60,16 @@ class DigestImpl {
60
}
61
62
if (const auto ret = mbedtls_md(mdInfo,
63
- reinterpret_cast<const unsigned char *>(input.data()),
+ static_cast<const unsigned char *>(
64
+ static_cast<const void *>(input.data())),
65
input.size(), digest.data()); ret != 0) {
66
return convertOp(std::string_view());
67
68
69
// mbedtls uses unsigned char buffers, while string_view expects char.
- return convertOp(std::string_view(
70
- reinterpret_cast<const char *>(digest.data()), DigestSize));
+ const auto *digestChars = static_cast<const char *>(
71
+ static_cast<const void *>(digest.data()));
72
+ return convertOp(std::string_view(digestChars, DigestSize));
73
74
};
75
0 commit comments