diff --git a/protocol/src/main/resources/swift/ByteBuffer.swift b/protocol/src/main/resources/swift/ByteBuffer.swift index 1be8b601..b9e695cc 100644 --- a/protocol/src/main/resources/swift/ByteBuffer.swift +++ b/protocol/src/main/resources/swift/ByteBuffer.swift @@ -64,6 +64,14 @@ class ByteBuffer { return Array(bytes) } + func writeUBytes(_ bytes: [UInt8]) { + let length = bytes.count + ensureCapacity(length) + for ubyte in bytes { + writeUByte(ubyte) + } + } + func toBytes() -> [Int8] { return Array(buffer[0..