class Xor

Public Instance Methods

decrypt(data, key) click to toggle source
# File lib/logstash/filters/xor.rb, line 4
def decrypt(data, key)
  data.length.times { |e|
    data[e] = (key[e % key.length].ord ^ data[e].ord).chr;
  }
  return data
end
xordecrypt() click to toggle source

Decrypt Payload and match it against Keywords

# File lib/logstash/filters/xor.rb, line 12
def xordecrypt
  return match(@payload,@prefix,@keys,@keywords)
end