SASL mechanism base class (stub)
# File lib/xmpp4r/sasl.rb, line 35 def initialize(stream) @stream = stream end
# File lib/xmpp4r/sasl.rb, line 41 def generate_auth(mechanism, text=nil) auth = REXML::Element.new 'auth' auth.add_namespace NS_SASL auth.attributes['mechanism'] = mechanism auth.text = text auth end
# File lib/xmpp4r/sasl.rb, line 49 def generate_nonce Digest::MD5.hexdigest(Time.new.to_f.to_s) end