///|
fn concat2(a : Bytes, b : Bytes) -> Bytes {
  let buf = @buffer.Buffer()
  buf.write_bytes(a)
  buf.write_bytes(b)
  buf.to_bytes()
}

///|
fn bytes_slice(data : Bytes, start : Int32, len : Int32) -> Bytes {
  let out = Array::make(len, b'\x00')
  for i in 0.. Bytes raise NoiseError {
  if start < 0 || len < 0 || start + len > data.length() {
    raise TruncatedMessage
  }
  bytes_slice(data, start, len)
}

///|
fn xor_bytes(a : Bytes, b : Bytes) -> Bytes {
  let len = a.length()
  let result = Array::make(len, b'\x00')
  for i in 0.. Bytes {
  let out = Array::make(n, b'\x00')
  let limit = if data.length() < n { data.length() } else { n }
  for i in 0.. Bytes {
  Bytes::make(count, byte)
}

///|
fn one_byte(byte : Byte) -> Bytes {
  let arr = [byte]
  Bytes::from_array(arr[:])
}

///|
fn zeros(n : Int32) -> Bytes {
  Bytes::make(n, b'\x00')
}