Skip to content

Commit

Permalink
Use new library
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioribeiro committed Jun 17, 2017
1 parent 7f37e81 commit 3a622e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Google2FA.php
Expand Up @@ -30,8 +30,8 @@
* @author Antonio Carlos Ribeiro @ PragmaRX
**/

use Base32\Base32;
use BaconQrCode\Writer;
use ParagonIE\ConstantTime\Base32;
use PragmaRX\Google2FA\Support\Url;
use BaconQrCode\Renderer\Image\Png;
use PragmaRX\Google2FA\Contracts\Google2FA as Google2FAContract;
Expand Down Expand Up @@ -181,7 +181,7 @@ public function base32Decode($b32)

$this->validateSecret($b32);

return Base32::decode($b32);
return Base32::decodeUpper($b32);
}

/**
Expand Down Expand Up @@ -503,7 +503,7 @@ protected function validateSecret($b32)
*/
public function toBase32($string)
{
$encoded = Base32::encode($string);
$encoded = Base32::encodeUpper($string);

return str_replace('=', '', $encoded);
}
Expand Down

0 comments on commit 3a622e8

Please sign in to comment.