Class: ActiveDirectory::Password

Inherits:
Object
  • Object
show all
Defined in:
lib/active_directory/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.



15
16
17
# File 'lib/active_directory/password.rb', line 15

def self.decode(hashed)
	nil
end

.encode(password) ⇒ Object

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



7
8
9
# File 'lib/active_directory/password.rb', line 7

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