diff --git a/src/Verifications.php b/src/Verifications.php index e4f5a5a..c2b19b4 100644 --- a/src/Verifications.php +++ b/src/Verifications.php @@ -3,12 +3,14 @@ namespace Mince; use InvalidArgumentException; use RuntimeException; -use Index\Base32; +use Index\XString; use Index\Data\{DbStatementCache,IDbConnection}; use Index\Net\IPAddress; use Ramsey\Uuid\UuidInterface; class Verifications { + private const CODE_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'; + private IDbConnection $dbConn; private DbStatementCache $cache; @@ -18,7 +20,7 @@ class Verifications { } public static function generateCode(): string { - return Base32::encode(random_bytes(6)); + return XString::random(10, self::CODE_CHARS); } public function prune(): void {