summaryrefslogtreecommitdiffstats
path: root/tests/EncodingTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/EncodingTest.php')
-rw-r--r--tests/EncodingTest.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/EncodingTest.php b/tests/EncodingTest.php
new file mode 100644
index 0000000..556c5a5
--- /dev/null
+++ b/tests/EncodingTest.php
@@ -0,0 +1,15 @@
+<?php
+use \ParagonIE\ConstantTime\Encoding;
+
+class EncodingTest extends PHPUnit_Framework_TestCase
+{
+ public function testBasicEncoding()
+ {
+ $str = random_bytes(33);
+ $enc = base64_encode($str);
+ $this->assertEquals(
+ $str,
+ Encoding::base64Decode($enc)
+ );
+ }
+} \ No newline at end of file