From dc01bdbc80cd382e33f61a21ce836a1e44a6c44c Mon Sep 17 00:00:00 2001 From: dew-git <55564947+dew-git@users.noreply.github.com> Date: Thu, 10 Oct 2019 20:43:32 -0800 Subject: [PATCH] Use the utility instead. --- library/OAuth1.php | 2 +- src/Network/FKOAuthDataStore.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/OAuth1.php b/library/OAuth1.php index 723f6592ed..e3ca246467 100644 --- a/library/OAuth1.php +++ b/library/OAuth1.php @@ -528,7 +528,7 @@ class OAuthRequest */ private static function generate_nonce() { - return bin2hex(random_bytes(16)); + return Friendica\Util\Strings::getRandomHex(32); } } diff --git a/src/Network/FKOAuthDataStore.php b/src/Network/FKOAuthDataStore.php index 9fba89685d..e3ee68d9c7 100644 --- a/src/Network/FKOAuthDataStore.php +++ b/src/Network/FKOAuthDataStore.php @@ -29,7 +29,7 @@ class FKOAuthDataStore extends OAuthDataStore */ private static function genToken() { - return bin2hex(random_bytes(16)); + return Friendica\Util\Strings::getRandomHex(32); } /**