aboutsummaryrefslogtreecommitdiff
path: root/src/Web/ZeroBin
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-11-04 15:38:53 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-11-04 15:38:53 +0300
commitcef7ecfd83612f8cac4560034b3e01988f27c7ec (patch)
treee2c2d6cce35ea81dba3fe67c708048c08f45add6 /src/Web/ZeroBin
parentab5802ad6d172adea49fc42edab9742551490be7 (diff)
downloadzerobin-cef7ecfd83612f8cac4560034b3e01988f27c7ec.tar.gz
Do not reduce entropy
Diffstat (limited to 'src/Web/ZeroBin')
-rw-r--r--src/Web/ZeroBin/Utils.hs4
1 files changed, 1 insertions, 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