Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hmac.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ namespace hmac {
string to_hex(const string& str, bool is_upper = false) {
uchar bytes[];
StringToCharArray(str, bytes, 0, -1, CP_UTF8);
int len = ArraySize(bytes);
if (len > 0 && bytes[len - 1] == '\0') len -= 1;
ArrayResize(bytes, len);
return to_hex(bytes, is_upper);
}

Expand Down
Loading