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.
23 24 25 |
# File 'lib/cinch/sasl/plain.rb', line 23 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.
16 17 18 |
# File 'lib/cinch/sasl/plain.rb', line 16 def mechanism_name "PLAIN" end |