Module: XOR

Defined in:
lib/ruby-des/xor.rb

Class Method Summary collapse

Class Method Details

.run(x, y) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/ruby-des/xor.rb', line 2

def self.run(x, y)
  output = []
  
  x.size.times do |i|
    output << (x[i] ^ y[i])
  end
  
  return output
end