module SipDigestAuth::Util

Utility functions for our library

Public Instance Methods

create_digest(*args) click to toggle source

args is an array of crap

# File lib/sip_digest_auth/util.rb, line 9
def create_digest(*args)
  ::Digest::MD5.hexdigest(args.join(":"))
end
generate_nonce(secret_key = rand.to_s, time = Time.now) click to toggle source
# File lib/sip_digest_auth/util.rb, line 13
def generate_nonce(secret_key = rand.to_s, time = Time.now)
  t = time.to_i
  create_digest(t, secret_key)
end