summaryrefslogtreecommitdiffstats
path: root/src/EncoderInterface.php
diff options
context:
space:
mode:
authorParagon Initiative Enterprises <security@paragonie.com>2016-06-12 20:42:47 -0400
committerParagon Initiative Enterprises <security@paragonie.com>2016-06-12 20:42:47 -0400
commit83f4c006f9d20db6e5d70a7d01ef125cadebfaec (patch)
treeb403b5068077c113d9472a57e63b0516363a1a59 /src/EncoderInterface.php
parent4ed9623466a93dbdc74edc91d46860f9e58d4c04 (diff)
downloadconstant_time_encoding-83f4c006f9d20db6e5d70a7d01ef125cadebfaec.zip
constant_time_encoding-83f4c006f9d20db6e5d70a7d01ef125cadebfaec.tar.gz
constant_time_encoding-83f4c006f9d20db6e5d70a7d01ef125cadebfaec.tar.bz2
Add support for unpadded encoding
Diffstat (limited to 'src/EncoderInterface.php')
-rw-r--r--src/EncoderInterface.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/EncoderInterface.php b/src/EncoderInterface.php
index 79744ce..ca69916 100644
--- a/src/EncoderInterface.php
+++ b/src/EncoderInterface.php
@@ -35,17 +35,18 @@ interface EncoderInterface
* Convert a binary string into a hexadecimal string without cache-timing
* leaks
*
- * @param string $bin_string (raw binary)
+ * @param string $binString (raw binary)
* @return string
*/
- public static function encode(string $bin_string): string;
+ public static function encode(string $binString): string;
/**
* Convert a binary string into a hexadecimal string without cache-timing
* leaks
*
- * @param string $encoded_string
+ * @param string $encodedString
+ * @param bool $strictPadding Error on invalid padding
* @return string (raw binary)
*/
- public static function decode(string $encoded_string): string;
+ public static function decode(string $encodedString, bool $strictPadding = false): string;
}