module Syndi::IRC::SASL::Mech::Plain
Module which implements the SASL
PLAIN mechanism.
Public Class Methods
encrypt(username, password, provision)
click to toggle source
Create an SASL-encrypted hash.
@author noxgirl
@param [String] username The username. @param [String] password The password associated with the username. @param [String] provision The key provided by the server.
# 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