Module: Syndi::IRC::SASL::Mech::Plain
- Defined in:
- lib/syndi/irc/sasl/mech/plain.rb
Overview
Module which implements the SASL PLAIN mechanism.
Class Method Summary collapse
-
.encrypt(username, password, provision) ⇒ Object
Create an SASL-encrypted hash.
Class Method Details
.encrypt(username, password, provision) ⇒ Object
Create an SASL-encrypted hash.
24 25 26 27 |
# File 'lib/syndi/irc/sasl/mech/plain.rb', line 24 def self.encrypt username, password, provision # Easy as this: Base64.encode64([username, username, password].join("\0")).gsub(/\n/, '') end |