# File lib/openid/server.rb, line 644 def create_association(dumb=true, assoc_type='HMAC-SHA1') secret = OpenID::Util.get_random_bytes(20) uniq = OpenID::Util.to_base64(OpenID::Util.get_random_bytes(4)) handle = "{%s}{%x}{%s}" % [assoc_type, Time.now.to_i, uniq] assoc = Association.from_expires_in(@@secret_lifetime, handle, secret, assoc_type) key = dumb ? @@dumb_key : @@normal_key @store.store_association(key, assoc) return assoc end