>>303
rubyだが
file = File.open('c:\test.txt','r')

buf = ""
while tmp = file.read(2)
buf += (tmp.hex ^ 0xd7).chr
end

print buf

これでどうかな?
元に戻すのは正直わからん