diff --git a/Sources/Crypto/Util/PrettyBytes.swift b/Sources/Crypto/Util/PrettyBytes.swift index 484c7523..1916e26e 100644 --- a/Sources/Crypto/Util/PrettyBytes.swift +++ b/Sources/Crypto/Util/PrettyBytes.swift @@ -42,12 +42,10 @@ extension DataProtocol { let ptr = UnsafeMutablePointer.allocate(capacity: hexLen) var offset = 0 - self.regions.forEach { (_) in - for i in self { - ptr[Int(offset * 2)] = itoh((i >> 4) & 0xF) - ptr[Int(offset * 2 + 1)] = itoh(i & 0xF) - offset += 1 - } + for i in self { + ptr[Int(offset * 2)] = itoh((i >> 4) & 0xF) + ptr[Int(offset * 2 + 1)] = itoh(i & 0xF) + offset += 1 } return String(bytesNoCopy: ptr, length: hexLen, encoding: .utf8, freeWhenDone: true)!