class BinData::Transform::Xor

Transforms the data stream by xoring each byte.

def initialize(xor)

def initialize(xor)
  super()
  @xor = xor
end

def read(n)

def read(n)
  chain_read(n).bytes.map { |byte| (byte ^ @xor).chr }.join
end

def write(data)

def write(data)
  chain_write(data.bytes.map { |byte| (byte ^ @xor).chr }.join)
end