function extractSecret($response)
{
if (!$response->hasKey(Auth_OpenID_OPENID_NS, 'dh_server_public')) {
return null;
}
if (!$response->hasKey(Auth_OpenID_OPENID_NS, 'enc_mac_key')) {
return null;
}
$math = Auth_OpenID_getMathLib();
$spub = $math->base64ToLong($response->getArg(Auth_OpenID_OPENID_NS, 'dh_server_public'));
$enc_mac_key = base64_decode($response->getArg(Auth_OpenID_OPENID_NS, 'enc_mac_key'));
return $this->dh->xorSecret($spub, $enc_mac_key, $this->hash_func);
}