function createAssociation($dumb = true, $assoc_type = 'HMAC-SHA1')
    {
        $secret = Auth_OpenID_CryptUtil::getBytes(
                    Auth_OpenID_getSecretSize($assoc_type));

        $uniq = base64_encode(Auth_OpenID_CryptUtil::getBytes(4));
        $handle = sprintf('{%s}{%x}{%s}', $assoc_type, intval(time()), $uniq);

        $assoc = Auth_OpenID_Association::fromExpiresIn(
                      $this->SECRET_LIFETIME, $handle, $secret, $assoc_type);

        if ($dumb) {
            $key = $this->dumb_key;
        } else {
            $key = $this->normal_key;
        }

        $this->store->storeAssociation($key, $assoc);
        return $assoc;
    }
function createAssociation($dumb = true, $assoc_type = 'HMAC-SHA1')
    {
        $secret = Auth_OpenID_CryptUtil::getBytes(
                    Auth_OpenID_getSecretSize($assoc_type));

        $uniq = base64_encode(Auth_OpenID_CryptUtil::getBytes(4));
        $handle = sprintf('{%s}{%x}{%s}', $assoc_type, intval(time()), $uniq);

        $assoc = Auth_OpenID_Association::fromExpiresIn(
                      $this->SECRET_LIFETIME, $handle, $secret, $assoc_type);

        if ($dumb) {
            $key = $this->dumb_key;
        } else {
            $key = $this->normal_key;
        }

        $this->store->storeAssociation($key, $assoc);
        return $assoc;
    }
function createAssociation ( $ dumb = true , $ assoc_type = 'HMAC-SHA1' ) { $ secret = Auth_OpenID_CryptUtil :: getBytes ( Auth_OpenID_getSecretSize ( $ assoc_type ) ) ; $ uniq = base64_encode ( Auth_OpenID_CryptUtil :: getBytes ( 4 ) ) ; $ handle = sprintf ( '{%s}{%x}{%s}' , $ assoc_type , intval ( time ( ) ) , $ uniq ) ; $ assoc = Auth_OpenID_Association :: fromExpiresIn ( $ this -> SECRET_LIFETIME , $ handle , $ secret , $ assoc_type ) ; if ( $ dumb ) { $ key = $ this -> dumb_key ; } else { $ key = $ this -> normal_key ; } $ this -> store -> storeAssociation ( $ key , $ assoc ) ; return $ assoc ; }
Make a new association.

@param bool $dumb
@param string $assoc_type
@return Auth_OpenID_Association
Make a new association .