Class | HTTPAuth::Digest::Utils |
In: |
lib/httpauth/digest.rb
|
Parent: | Object |
Calculate the digest value for the directives as explained in the RFC.
Create a nonce value of the time and a salt. The nonce is created in such a way that the issuer can check the age of the nonce.
Decodes digest directives from a header. Returns a hash with directives.
Calculate the H(A1) as explain in the RFC. If h[:digest] is set, it‘s used instead of calculating H(username ":" realm ":" password).
Concat arguments the way it‘s done frequently in the Digest spec.
digest_concat('a', 'b') #=> "a:b" digest_concat('a', 'b', c') #=> "a:b:c"
Encodes a hash with digest directives to send in a header.
Return a hash with the keys in keys found in h.
Example
filter_h_on({1=>1,2=>2}, [1]) #=> {1=>1} filter_h_on({1=>1,2=>2}, [1, 2]) #=> {1=>1,2=>2}