You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not 100% sure about the Sequence conformance of non-contiguous DataProtocol, but it seemed to me that the self on line 46 should be the ignored parameter $0 (or maybe eliminate the region logic since looping over self most likely would have taken non-contiguous memory regions into account?), otherwise the code reads:
For each segment of the data buffer, loop over the entirety of data buffer and convert each byte to two hex chars.
Unless non-contiguous DataProtocol has non-stable indices and iterators, this code will over/re-iterate the data buffer.
The text was updated successfully, but these errors were encountered:
Yup, it sure does! Would you like to submit a patch to fix it? As a practical matter I think we can ignore the regions here, and just use the sequence conformance directly.
I was looking for a not
%02x
way of converting binary to hexString
, and I stumbled upon the implementation inPrettyBytes.swift
.swift-crypto/Sources/Crypto/Util/PrettyBytes.swift
Lines 45 to 51 in 9cc89f0
I'm not 100% sure about the
Sequence
conformance of non-contiguousDataProtocol
, but it seemed to me that theself
on line 46 should be the ignored parameter$0
(or maybe eliminate the region logic since looping overself
most likely would have taken non-contiguous memory regions into account?), otherwise the code reads:Unless non-contiguous
DataProtocol
has non-stable indices and iterators, this code will over/re-iterate the data buffer.The text was updated successfully, but these errors were encountered: