summaryrefslogtreecommitdiff
path: root/ymir/mlmmj-expose.nix
diff options
context:
space:
mode:
Diffstat (limited to 'ymir/mlmmj-expose.nix')
-rw-r--r--ymir/mlmmj-expose.nix8
1 files changed, 1 insertions, 7 deletions
diff --git a/ymir/mlmmj-expose.nix b/ymir/mlmmj-expose.nix
index b07396aa..077f6c81 100644
--- a/ymir/mlmmj-expose.nix
+++ b/ymir/mlmmj-expose.nix
@@ -19,17 +19,11 @@ let
19 19
20 import Control.Monad 20 import Control.Monad
21 21
22 -- import Codec.Crypto.SimpleAES
23
24 import Crypto.Hash 22 import Crypto.Hash
25 23
26 import qualified Data.ByteString.Lazy as LBS 24 import qualified Data.ByteString.Lazy as LBS
27 import qualified Data.ByteString.Lazy.Char8 as CLBS
28 import qualified Data.ByteString as BS
29 import qualified Data.ByteString.Char8 as CBS 25 import qualified Data.ByteString.Char8 as CBS
30 26
31 -- import Data.Hex
32
33 import qualified Data.UUID as UUID (toString) 27 import qualified Data.UUID as UUID (toString)
34 import qualified Data.UUID.V4 as UUID (nextRandom) 28 import qualified Data.UUID.V4 as UUID (nextRandom)
35 29
@@ -88,7 +82,7 @@ let
88 readDir dir = concat <$> (mapM (fmap lines . readFile) . map (dir </>) . filter (not . (`elem` [".", ".."]))=<< (getDirectoryContents dir)) 82 readDir dir = concat <$> (mapM (fmap lines . readFile) . map (dir </>) . filter (not . (`elem` [".", ".."]))=<< (getDirectoryContents dir))
89 83
90 hash' :: Show a => a -> String 84 hash' :: Show a => a -> String
91 hash' = take len . map toLower . show . (hash :: BS.ByteString -> Digest SHA256) . CBS.pack . map toLower . show 85 hash' = take len . map toLower . show . (hash :: CBS.ByteString -> Digest SHA256) . CBS.pack . map toLower . show
92 86
93 len :: Int 87 len :: Int
94 len = 32 88 len = 32