aboutsummaryrefslogtreecommitdiff
path: root/tests/BTLS/TestUtilities.hs
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@google.com>2018-09-28 18:33:35 -0400
committerGravatar Benjamin Barenblat <bbaren@google.com>2018-09-28 18:33:35 -0400
commite74149a7569afd1ea7d67c77f40c37471e7e3e58 (patch)
treed8478e569eade926a72829eee9d3afe0e8f12710 /tests/BTLS/TestUtilities.hs
parent8ac48890e98a4974980b8ca3d5e90a2e52c1a624 (diff)
Begin implementing symmetric encryption
Support RC4. Future commits will add support for more modern algorithms.
Diffstat (limited to 'tests/BTLS/TestUtilities.hs')
-rw-r--r--tests/BTLS/TestUtilities.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/BTLS/TestUtilities.hs b/tests/BTLS/TestUtilities.hs
index 01e57bb..b8a83c0 100644
--- a/tests/BTLS/TestUtilities.hs
+++ b/tests/BTLS/TestUtilities.hs
@@ -17,6 +17,7 @@
module BTLS.TestUtilities
( abbreviate
, hex
+ , showHex
) where
import qualified Data.ByteString.Base16 as Base16
@@ -47,3 +48,6 @@ hex s =
case Base16.decode s of
(r, "") -> r
_ -> error $ "invalid hex string " ++ unpack s
+
+showHex :: ByteString -> String
+showHex = unpack . Base16.encode