Module CASServer::Authenticators::SQLRestAuth::EncryptedPassword
In: lib/casserver/authenticators/sql_rest_auth.rb

Methods

Public Class methods

[Source]

    # File lib/casserver/authenticators/sql_rest_auth.rb, line 62
62:     def self.included(mod)
63:       raise "#{self} should be inclued in an ActiveRecord class!" unless mod.respond_to?(:before_save)
64:     end

Public Instance methods

[Source]

    # File lib/casserver/authenticators/sql_rest_auth.rb, line 66
66:     def encrypt(password)
67:       password_digest(password, self.salt)
68:     end

[Source]

    # File lib/casserver/authenticators/sql_rest_auth.rb, line 74
74:     def password_digest(password, salt)
75:       digest = @options[:site_key]
76:       @options[:digest_streches].times do
77:         digest = secure_digest(digest, salt, password, @options[:site_key])
78:       end
79:       digest
80:     end

[Source]

    # File lib/casserver/authenticators/sql_rest_auth.rb, line 70
70:     def secure_digest(*args)
71:       Digest::SHA1.hexdigest(args.flatten.join('--'))
72:     end

[Validate]