Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/pbkdf2.rb

Instance Method Summary collapse

Instance Method Details

#^(other) ⇒ Object

Raises:

  • (ArgumentError)


110
111
112
113
114
115
116
117
# File 'lib/pbkdf2.rb', line 110

def ^(other)
  raise ArgumentError, "Can't bitwise-XOR a String with a non-String" \
    unless other.kind_of? String
  raise ArgumentError, "Can't bitwise-XOR strings of different length" \
    unless length == other.length

  xor_impl(other)
end