diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2015-11-04 15:38:53 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2015-11-04 15:38:53 +0300 |
commit | cef7ecfd83612f8cac4560034b3e01988f27c7ec (patch) | |
tree | e2c2d6cce35ea81dba3fe67c708048c08f45add6 /src/Web/ZeroBin | |
parent | ab5802ad6d172adea49fc42edab9742551490be7 (diff) | |
download | zerobin-cef7ecfd83612f8cac4560034b3e01988f27c7ec.tar.gz |
Do not reduce entropy
Diffstat (limited to 'src/Web/ZeroBin')
-rw-r--r-- | src/Web/ZeroBin/Utils.hs | 4 |
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 |