summaryrefslogtreecommitdiffstats
path: root/src/Encoding.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Encoding.php')
-rw-r--r--src/Encoding.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Encoding.php b/src/Encoding.php
index 657e855..a8fadb0 100644
--- a/src/Encoding.php
+++ b/src/Encoding.php
@@ -45,6 +45,27 @@ abstract class Encoding
{
return Base32::decode($str);
}
+ /**
+ * RFC 4648 Base32 encoding
+ *
+ * @param $str
+ * @return string
+ */
+ public static function base32HexEncode($str)
+ {
+ return Base32Hex::encode($str);
+ }
+
+ /**
+ * RFC 4648 Base32 decoding
+ *
+ * @param $str
+ * @return string
+ */
+ public static function base32HexDecode($str)
+ {
+ return Base32Hex::decode($str);
+ }
/**
* RFC 4648 Base64 encoding