Replace common_good_random with common_random_hexstr

This commit is contained in:
Mikael Nordfeldth
2013-10-21 13:20:30 +02:00
parent 7233869298
commit 3cab5b36c1
14 changed files with 46 additions and 54 deletions

View File

@@ -251,9 +251,9 @@ class FeedSub extends Managed_DataObject
protected function doSubscribe($mode)
{
$orig = clone($this);
$this->verify_token = common_good_rand(16);
$this->verify_token = common_random_hexstr(16);
if ($mode == 'subscribe') {
$this->secret = common_good_rand(32);
$this->secret = common_random_hexstr(32);
}
$this->sub_state = $mode;
$this->update($orig);

View File

@@ -132,7 +132,7 @@ class HubSub extends Managed_DataObject
{
assert($mode == 'subscribe' || $mode == 'unsubscribe');
$challenge = common_good_rand(32);
$challenge = common_random_hexstr(32);
$params = array('hub.mode' => $mode,
'hub.topic' => $this->topic,
'hub.challenge' => $challenge);