diff options
Diffstat (limited to 'vendor/paragonie/constant_time_encoding/src/Encoding.php')
-rw-r--r-- | vendor/paragonie/constant_time_encoding/src/Encoding.php | 108 |
1 files changed, 72 insertions, 36 deletions
diff --git a/vendor/paragonie/constant_time_encoding/src/Encoding.php b/vendor/paragonie/constant_time_encoding/src/Encoding.php index 8649f31fc..8b7e3878e 100644 --- a/vendor/paragonie/constant_time_encoding/src/Encoding.php +++ b/vendor/paragonie/constant_time_encoding/src/Encoding.php @@ -40,8 +40,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32Encode(string $str): string - { + public static function base32Encode( + #[\SensitiveParameter] + string $str + ): string { return Base32::encode($str); } @@ -52,8 +54,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32EncodeUpper(string $str): string - { + public static function base32EncodeUpper( + #[\SensitiveParameter] + string $str + ): string { return Base32::encodeUpper($str); } @@ -64,8 +68,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32Decode(string $str): string - { + public static function base32Decode( + #[\SensitiveParameter] + string $str + ): string { return Base32::decode($str); } @@ -76,8 +82,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32DecodeUpper(string $str): string - { + public static function base32DecodeUpper( + #[\SensitiveParameter] + string $str + ): string { return Base32::decodeUpper($str); } @@ -88,8 +96,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexEncode(string $str): string - { + public static function base32HexEncode( + #[\SensitiveParameter] + string $str + ): string { return Base32Hex::encode($str); } @@ -100,8 +110,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexEncodeUpper(string $str): string - { + public static function base32HexEncodeUpper( + #[\SensitiveParameter] + string $str + ): string { return Base32Hex::encodeUpper($str); } @@ -112,8 +124,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexDecode(string $str): string - { + public static function base32HexDecode( + #[\SensitiveParameter] + string $str + ): string { return Base32Hex::decode($str); } @@ -124,8 +138,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base32HexDecodeUpper(string $str): string - { + public static function base32HexDecodeUpper( + #[\SensitiveParameter] + string $str + ): string { return Base32Hex::decodeUpper($str); } @@ -136,8 +152,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64Encode(string $str): string - { + public static function base64Encode( + #[\SensitiveParameter] + string $str + ): string { return Base64::encode($str); } @@ -148,8 +166,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64Decode(string $str): string - { + public static function base64Decode( + #[\SensitiveParameter] + string $str + ): string { return Base64::decode($str); } @@ -161,8 +181,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64EncodeDotSlash(string $str): string - { + public static function base64EncodeDotSlash( + #[\SensitiveParameter] + string $str + ): string { return Base64DotSlash::encode($str); } @@ -176,8 +198,10 @@ abstract class Encoding * @throws \RangeException * @throws TypeError */ - public static function base64DecodeDotSlash(string $str): string - { + public static function base64DecodeDotSlash( + #[\SensitiveParameter] + string $str + ): string { return Base64DotSlash::decode($str); } @@ -189,8 +213,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function base64EncodeDotSlashOrdered(string $str): string - { + public static function base64EncodeDotSlashOrdered( + #[\SensitiveParameter] + string $str + ): string { return Base64DotSlashOrdered::encode($str); } @@ -204,8 +230,10 @@ abstract class Encoding * @throws \RangeException * @throws TypeError */ - public static function base64DecodeDotSlashOrdered(string $str): string - { + public static function base64DecodeDotSlashOrdered( + #[\SensitiveParameter] + string $str + ): string { return Base64DotSlashOrdered::decode($str); } @@ -217,8 +245,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function hexEncode(string $bin_string): string - { + public static function hexEncode( + #[\SensitiveParameter] + string $bin_string + ): string { return Hex::encode($bin_string); } @@ -230,8 +260,10 @@ abstract class Encoding * @return string (raw binary) * @throws \RangeException */ - public static function hexDecode(string $hex_string): string - { + public static function hexDecode( + #[\SensitiveParameter] + string $hex_string + ): string { return Hex::decode($hex_string); } @@ -243,8 +275,10 @@ abstract class Encoding * @return string * @throws TypeError */ - public static function hexEncodeUpper(string $bin_string): string - { + public static function hexEncodeUpper( + #[\SensitiveParameter] + string $bin_string + ): string { return Hex::encodeUpper($bin_string); } @@ -255,8 +289,10 @@ abstract class Encoding * @param string $bin_string (raw binary) * @return string */ - public static function hexDecodeUpper(string $bin_string): string - { + public static function hexDecodeUpper( + #[\SensitiveParameter] + string $bin_string + ): string { return Hex::decode($bin_string); } } |