Class: ActiveDirectory::Password
- Inherits:
-
Object
- Object
- ActiveDirectory::Password
- Defined in:
- lib/active_directory/password.rb
Class Method Summary collapse
-
.decode(hashed) ⇒ Object
Always returns nil, since you can’t decrypt the User’s encrypted password.
-
.encode(password) ⇒ Object
Encodes an unencrypted password into an encrypted password that the Active Directory server will understand.
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 |