Class | HTAuth::Sha1 |
In: |
lib/htauth/sha1.rb
lib/htauth/sha1.rb |
Parent: | Algorithm |
an implementation of the SHA based encoding algorithm as used in the apache htpasswd -s option
# File lib/htauth/sha1.rb, line 19 19: def encode(password) 20: "#{prefix}#{Base64.encode64(::Digest::SHA1.digest(password)).strip}" 21: end