Method: Cinch::SASL::Plain.generate

Defined in:
lib/cinch/sasl/plain.rb

.generate(user, password, _ = nil) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Returns:

Since:

  • 2.0.0



20
21
22
# File 'lib/cinch/sasl/plain.rb', line 20

def generate(user, password, _ = nil)
  Base64.strict_encode64([user, user, password].join("\0"))
end