diff options
author | Antonio Carlos Ribeiro <acr@antoniocarlosribeiro.com> | 2017-06-16 23:46:17 -0300 |
---|---|---|
committer | Antonio Carlos Ribeiro <acr@antoniocarlosribeiro.com> | 2017-06-16 23:46:17 -0300 |
commit | 5090c5359e70a0090b5c17fb998b41521bf1cd28 (patch) | |
tree | b4df7cdfef8347d1eead526bb5b4e4eb4c000055 | |
parent | 387cbdd4a59dc5000a47a1d9781f47c194a77185 (diff) | |
download | google2fa-5090c5359e70a0090b5c17fb998b41521bf1cd28.zip google2fa-5090c5359e70a0090b5c17fb998b41521bf1cd28.tar.gz google2fa-5090c5359e70a0090b5c17fb998b41521bf1cd28.tar.bz2 |
Rename variable
-rw-r--r-- | src/Contracts/Google2FA.php | 8 | ||||
-rw-r--r-- | src/Google2FA.php | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/Contracts/Google2FA.php b/src/Contracts/Google2FA.php index bae992e..abb203e 100644 --- a/src/Contracts/Google2FA.php +++ b/src/Contracts/Google2FA.php @@ -61,14 +61,14 @@ interface Google2FA * Verifies a user inputted key against the current timestamp. Checks $window * keys either side of the timestamp. * - * @param string $b32seed + * @param string $secret * @param string $key - User specified key * @param int $window * @param bool $useTimeStamp * * @return bool **/ - public function verifyKey($b32seed, $key, $window = 4, $useTimeStamp = true); + public function verifyKey($secret, $key, $window = 4, $useTimeStamp = true); /** * Verifies a user inputted key against the current timestamp. Checks $window @@ -76,7 +76,7 @@ interface Google2FA * the given oldTimestamp. Useful if you need to ensure that a single key cannot * be used twice. * - * @param string $b32seed + * @param string $secret * @param string $key - User specified key * @param int $oldTimestamp - The timestamp from the last verified key * @param int $window @@ -84,7 +84,7 @@ interface Google2FA * * @return bool|int - false (not verified) or the timestamp of the verified key **/ - public function verifyKeyNewer($b32seed, $key, $oldTimestamp, $window = 4, $useTimeStamp = true); + public function verifyKeyNewer($secret, $key, $oldTimestamp, $window = 4, $useTimeStamp = true); /** * Extracts the OTP from the SHA1 hash. diff --git a/src/Google2FA.php b/src/Google2FA.php index 288afa0..d3a3bf5 100644 --- a/src/Google2FA.php +++ b/src/Google2FA.php @@ -246,18 +246,18 @@ class Google2FA implements Google2FAContract * Verifies a user inputted key against the current timestamp. Checks $window * keys either side of the timestamp. * - * @param string $b32seed + * @param string $secret * @param string $key - User specified key * @param int $window * @param bool|int $useTimestamp * @param null|int $oldTimestamp * @return bool|int */ - public function verifyKey($b32seed, $key, $window = null, $useTimestamp = true, $oldTimestamp = null) + public function verifyKey($secret, $key, $window = null, $useTimestamp = true, $oldTimestamp = null) { $timestamp = $this->makeStartingTimestamp($useTimestamp); - $binarySeed = $this->base32Decode($b32seed); + $binarySeed = $this->base32Decode($secret); $ts = is_null($oldTimestamp) ? $timestamp - $this->getWindow($window) @@ -282,7 +282,7 @@ class Google2FA implements Google2FAContract * the given oldTimestamp. Useful if you need to ensure that a single key cannot * be used twice. * - * @param string $b32seed + * @param string $secret * @param string $key - User specified key * @param int $oldTimestamp - The timestamp from the last verified key * @param int $window @@ -290,9 +290,9 @@ class Google2FA implements Google2FAContract * * @return bool|int - false (not verified) or the timestamp of the verified key **/ - public function verifyKeyNewer($b32seed, $key, $oldTimestamp, $window = null, $useTimestamp = true) + public function verifyKeyNewer($secret, $key, $oldTimestamp, $window = null, $useTimestamp = true) { - return $this->verifyKey($b32seed, $key, $window, $useTimestamp, $oldTimestamp); + return $this->verifyKey($secret, $key, $window, $useTimestamp, $oldTimestamp); } /** |