Class: Cinch::SASL::Plain Private
- Defined in:
- lib/cinch/sasl/plain.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The simplest mechanisms simply transmits the username and password without adding any encryption or hashing. As such it’s more insecure than DH-BLOWFISH and should only be used in combination with SSL.
Class Method Summary collapse
-
.generate(user, password, _ = nil) ⇒ String
private
-
.mechanism_name ⇒ String
private
Class Method Details
.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.
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 |
.mechanism_name ⇒ 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.
13 14 15 |
# File 'lib/cinch/sasl/plain.rb', line 13 def mechanism_name "PLAIN" end |