From e74149a7569afd1ea7d67c77f40c37471e7e3e58 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Fri, 28 Sep 2018 18:33:35 -0400 Subject: Begin implementing symmetric encryption Support RC4. Future commits will add support for more modern algorithms. --- tests/BTLS/TestUtilities.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/BTLS/TestUtilities.hs') 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 -- cgit v1.2.3