Skip to content

Commit bb6bd01

Browse files
committed
🚿
1 parent a4f59b2 commit bb6bd01

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Common/Base64.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Base64{
3636
public static function encode(string $str):string{
3737

3838
if(function_exists('sodium_bin2base64')){
39-
return sodium_bin2base64($str, \SODIUM_BASE64_VARIANT_ORIGINAL);
39+
return \sodium_bin2base64($str, \SODIUM_BASE64_VARIANT_ORIGINAL);
4040
}
4141

4242
return ConstantTimeBase64::encode($str);
@@ -49,7 +49,7 @@ public static function decode(string $base64):string{
4949
self::checkCharacterSet($base64);
5050

5151
if(function_exists('sodium_base642bin')){
52-
return sodium_base642bin($base64, \SODIUM_BASE64_VARIANT_ORIGINAL);
52+
return \sodium_base642bin($base64, \SODIUM_BASE64_VARIANT_ORIGINAL);
5353
}
5454

5555
return ConstantTimeBase64::decode($base64);

src/Common/Hex.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,29 @@ class Hex{
2727
public const CHARSET = '1234567890ABCDEFabcdef';
2828

2929
/**
30-
* Encode a raw-binary to hexadecimal
30+
* Encode a string to hexadecimal
3131
*
3232
* @codeCoverageIgnore
3333
*/
3434
public static function encode(string $str):string{
3535

3636
if(function_exists('sodium_bin2hex')){
37-
return sodium_bin2hex($str);
37+
return \sodium_bin2hex($str);
3838
}
3939

4040
return ConstantTimeHex::encode($str);
4141
}
4242

4343
/**
44-
* Decode a raw-binary string from hexadecimal
44+
* Decode a string from hexadecimal
4545
*
4646
* @codeCoverageIgnore
4747
*/
4848
public static function decode(string $hex):string{
4949
self::checkCharacterSet($hex);
5050

5151
if(function_exists('sodium_hex2bin')){
52-
return sodium_hex2bin($hex);
52+
return \sodium_hex2bin($hex);
5353
}
5454

5555
return ConstantTimeHex::decode($hex);

0 commit comments

Comments
 (0)