From cef7ecfd83612f8cac4560034b3e01988f27c7ec Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Wed, 4 Nov 2015 15:38:53 +0300 Subject: Do not reduce entropy --- src/Web/ZeroBin/Utils.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Web/ZeroBin/Utils.hs b/src/Web/ZeroBin/Utils.hs index 915d8ad..8f29ec4 100644 --- a/src/Web/ZeroBin/Utils.hs +++ b/src/Web/ZeroBin/Utils.hs @@ -7,13 +7,11 @@ import Crypto.Random.Entropy (getEntropy) import Data.ByteString (ByteString) import Data.ByteString.Base64 (encode) import Data.ByteString.Char8 (unpack) -import Data.Char (isAlphaNum) toWeb :: ByteString -> String toWeb = takeWhile (/= '=') . unpack . encode makePassword :: Int -> IO String -makePassword n = (map (\c -> if isAlphaNum c then c else 'X') - . toWeb) `fmap` getEntropy n +makePassword n = toWeb `fmap` getEntropy n -- cgit v1.2.3