How do you convert an UnsafeMutablePointer to a Data object?
let bytes = UnsafeMutablePointer<UInt8>.allocate(capacity: 20) let data: Data = ...?
You can use:
let data = Data(bytes: bytes, count: 20)