Class: Cinch::SASL::Plain Private

Inherits:
Mechanism show all
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.

Since:

  • 2.0.0

Class Method Summary collapse

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.

Parameters:

Returns:

Since:

  • 2.0.0



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_nameString

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.

Returns:

Since:

  • 2.0.0



13
14
15
# File 'lib/cinch/sasl/plain.rb', line 13

def mechanism_name
  "PLAIN"
end