Exposes methods for generating hex-encoded strings from a collection of bytes (#2189, fixes #2187).
import Vapor
let bytes: [UInt8] = ...
print(bytes.hexEncodedString()) // Hex-encoded w/ lowercase characters
print(bytes.hexEncodedString(uppercase: true)) // Hex-encoded w/ uppercase characters
A concise hex
method has also been added to match the similar base64
method which already exists.
print(bytes.hex) // Hex-encoded string (lowercase)