an implementation of the SHA based encoding algorithm as used in the apache htpasswd -s option
ignore the params
[Source]
# File lib/htauth/sha1.rb, line 12 12: def initialize(params = {}) 13: end
# File lib/htauth/sha1.rb, line 19 19: def encode(password) 20: "#{prefix}#{Base64.encode64(::Digest::SHA1.digest(password)).strip}" 21: end
# File lib/htauth/sha1.rb, line 15 15: def prefix 16: "{SHA}" 17: end
[Validate]