Class: ActiveDirectory::FieldType::Password
- Inherits:
-
Object
- Object
- ActiveDirectory::FieldType::Password
- Defined in:
- lib/active_directory/field_type/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.
36 37 38 |
# File 'lib/active_directory/field_type/password.rb', line 36 def self.decode(hashed) nil end |
.encode(password) ⇒ Object
Encodes an unencrypted password into an encrypted password that the Active Directory server will understand.
28 29 30 |
# File 'lib/active_directory/field_type/password.rb', line 28 def self.encode(password) ("\"#{password}\"".split(//).collect { |c| "#{c}\000" }).join end |