Class: ActiveDirectory::FieldType::Password

Inherits:
Object
  • Object
show all
Defined in:
lib/active_directory/field_type/password.rb

Class Method Summary collapse

Class Method Details

.decode(hashed) ⇒ Object

Always returns nil, since you can’t decrypt the User’s encrypted password.



39
40
41
# File 'lib/active_directory/field_type/password.rb', line 39

def self.decode(hashed)
	nil
end

.encode(password) ⇒ Object

Encodes an unencrypted password into an encrypted password that the Active Directory server will understand.



31
32
33
# File 'lib/active_directory/field_type/password.rb', line 31

def self.encode(password)
	("\"#{password}\"".split(//).collect { |c| "#{c}\000" }).join
end