Method: I2P::BOB::Client#verify

Defined in:
lib/i2p/bob/client.rb

#verify(data) ⇒ Boolean

Verifies a Base64-formatted key pair or destination, returning ‘true` for valid input.

Examples:

bob.verify("foobar")                 #=> false
bob.verify(I2P::Hosts["forum.i2p"])  #=> true

Parameters:

  • data (#to_base64, #to_s)

Returns:

  • (Boolean)

Since:

  • 0.1.4



190
191
192
193
# File 'lib/i2p/bob/client.rb', line 190

def verify(data)
  send_command(:verify, data.respond_to?(:to_base64) ? data.to_base64 : data.to_s)
  read_response rescue false
end