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.
38 39 40 |
# File 'lib/active_directory/password.rb', line 38 def self.decode(hashed) nil end |
.encode(password) ⇒ Object
Encodes an unencrypted password into an encrypted password that the Active Directory server will understand.
30 31 32 |
# File 'lib/active_directory/password.rb', line 30 def self.encode(password) ("\"#{password}\"".split(//).collect { |c| "#{c}\000" }).join end |