发布测试版 2.5.0

This commit is contained in:
2021-11-28 12:06:10 +08:00
parent 672cc966db
commit 8408038188
807 changed files with 94347 additions and 47563 deletions
+13 -12
View File
@@ -97,18 +97,6 @@ class Totp
return $val2[1];
}
/**
* @param string $user
* @param string $hostname
* @param string $secret
* @return string
*/
public function getURL($user, $hostname, $secret)
{
$encoderURL = sprintf("otpauth://totp/%s@%s%%3Fsecret%%3D%s", $user, $hostname, $secret);
return $encoderURL;
}
/**
* @return string
*/
@@ -123,6 +111,19 @@ class Totp
}
return Base32::encode($secret);
}
/**
* @param string $user
* @param string $host
* @param string $secret
* @param string $issuer
* @return string
*/
public static function getURL($user, $host, $secret, $issuer)
{
$encoderURL = sprintf("otpauth://totp/%s@%s%%3Fsecret%%3D%s%%3Fissuer%%3D%s", $user, $host, $secret, urlencode($issuer));
return $encoderURL;
}
}
/*