Class: String

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

Instance Method Summary collapse

Instance Method Details

#^(other) ⇒ Object

Raises:

  • (ArgumentError)


184
185
186
187
188
189
190
191
# File 'lib/shortener/server/pbkdf2.rb', line 184

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 self.length == other.length

  xor_impl(other)
end