From 3fd785654372d493c031d9b541ab33a881023a32 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 26 Feb 2021 19:16:17 +0300 Subject: * switch to composer for qrcode and otp dependencies * move most OTP-related stuff into userhelper * remove old phpqrcode and otphp libraries --- .../constant_time_encoding/tests/Base32HexTest.php | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php (limited to 'vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php') diff --git a/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php b/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php new file mode 100644 index 000000000..ed19f336f --- /dev/null +++ b/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php @@ -0,0 +1,49 @@ +assertSame( + $random, + Base32Hex::decode($enc) + ); + $unpadded = \rtrim($enc, '='); + $this->assertSame( + $unpadded, + Base32Hex::encodeUnpadded($random) + ); + $this->assertSame( + $random, + Base32Hex::decode($unpadded) + ); + + $enc = Base32Hex::encodeUpper($random); + $this->assertSame( + $random, + Base32Hex::decodeUpper($enc) + ); $unpadded = \rtrim($enc, '='); + $this->assertSame( + $unpadded, + Base32Hex::encodeUpperUnpadded($random) + ); + $this->assertSame( + $random, + Base32Hex::decodeUpper($unpadded) + ); + } + } + } +} -- cgit v1.2.3