nvanderw / xkcd936 Goto Github PK
View Code? Open in Web Editor NEWRandom passwords using the NaCl crypto library
Random passwords using the NaCl crypto library
GMP is installed on my machine, but the linker failed to find it. Any ideas on how to link against brew binaries for the cabal installer?
┌─[ken][Kens-MacBook-Pro][±][master ✓][2.1.2][~/ksheedlo/xkcd936]
└─▪ cabal install --only-dependencies
Resolving dependencies...
Notice: installing into a sandbox located at
/Users/ken/ksheedlo/xkcd936/.cabal-sandbox
Downloading data-default-class-0.0.1...
Downloading dlist-0.7.1...
Configuring dlist-0.7.1...
Downloading primitive-0.5.3.0...
Configuring data-default-class-0.0.1...
Downloading stm-2.4.3...
Failed to install data-default-class-0.0.1
Last 10 lines of the build log ( /Users/ken/ksheedlo/xkcd936/.cabal-sandbox/logs/data-default-class-0.0.1.log ):
Configuring primitive-0.5.3.0...
Downloading tagged-0.7.2...
Configuring stm-2.4.3...
Downloading text-1.2.0.0...
Failed to install dlist-0.7.1
Last 10 lines of the build log ( /Users/ken/ksheedlo/xkcd936/.cabal-sandbox/logs/dlist-0.7.1.log ):
Failed to install primitive-0.5.3.0
Last 10 lines of the build log ( /Users/ken/ksheedlo/xkcd936/.cabal-sandbox/logs/primitive-0.5.3.0.log ):
Failed to install stm-2.4.3
Last 10 lines of the build log ( /Users/ken/ksheedlo/xkcd936/.cabal-sandbox/logs/stm-2.4.3.log ):
Configuring tagged-0.7.2...
Downloading transformers-0.4.1.0...
Failed to install tagged-0.7.2
Last 10 lines of the build log ( /Users/ken/ksheedlo/xkcd936/.cabal-sandbox/logs/tagged-0.7.2.log ):
Configuring text-1.2.0.0...
Failed to install text-1.2.0.0
Last 10 lines of the build log ( /Users/ken/ksheedlo/xkcd936/.cabal-sandbox/logs/text-1.2.0.0.log ):
Configuring transformers-0.4.1.0...
Failed to install transformers-0.4.1.0
Last 10 lines of the build log ( /Users/ken/ksheedlo/xkcd936/.cabal-sandbox/logs/transformers-0.4.1.0.log ):
cabal: Error: some packages failed to install:
conduit-1.2.0.2 depends on transformers-0.4.1.0 which failed to install.
data-default-0.5.3 depends on dlist-0.7.1 which failed to install.
data-default-class-0.0.1 failed during the configure step. The exception was:
user error (ld: library not found for -lgmp
collect2: error: ld returned 1 exit status
)
data-default-instances-base-0.0.1 depends on data-default-class-0.0.1 which
failed to install.
data-default-instances-containers-0.0.1 depends on data-default-class-0.0.1
which failed to install.
data-default-instances-dlist-0.0.1 depends on dlist-0.7.1 which failed to
install.
data-default-instances-old-locale-0.0.1 depends on data-default-class-0.0.1
which failed to install.
dlist-0.7.1 failed during the configure step. The exception was:
user error (ld: library not found for -lgmp
collect2: error: ld returned 1 exit status
)
exceptions-0.6.1 depends on transformers-0.4.1.0 which failed to install.
hashable-1.2.2.0 depends on text-1.2.0.0 which failed to install.
lifted-base-0.2.3.0 depends on transformers-0.4.1.0 which failed to install.
mmorph-1.0.4 depends on transformers-0.4.1.0 which failed to install.
monad-control-0.3.3.0 depends on transformers-0.4.1.0 which failed to install.
mtl-2.2.1 depends on transformers-0.4.1.0 which failed to install.
nats-0.2 depends on text-1.2.0.0 which failed to install.
primitive-0.5.3.0 failed during the configure step. The exception was:
user error (ld: library not found for -lgmp
collect2: error: ld returned 1 exit status
)
regex-base-0.93.2 depends on transformers-0.4.1.0 which failed to install.
regex-posix-0.95.2 depends on transformers-0.4.1.0 which failed to install.
resourcet-1.1.2.3 depends on transformers-0.4.1.0 which failed to install.
salt-0.0.0.0 depends on tagged-0.7.2 which failed to install.
semigroups-0.15.3 depends on text-1.2.0.0 which failed to install.
stm-2.4.3 failed during the configure step. The exception was:
user error (ld: library not found for -lgmp
collect2: error: ld returned 1 exit status
)
tagged-0.7.2 failed during the configure step. The exception was:
user error (ld: library not found for -lgmp
collect2: error: ld returned 1 exit status
)
text-1.2.0.0 failed during the configure step. The exception was:
user error (ld: library not found for -lgmp
collect2: error: ld returned 1 exit status
)
transformers-0.4.1.0 failed during the configure step. The exception was:
user error (ld: library not found for -lgmp
collect2: error: ld returned 1 exit status
)
transformers-base-0.4.3 depends on transformers-0.4.1.0 which failed to
install.
unordered-containers-0.2.5.0 depends on text-1.2.0.0 which failed to install.
vector-0.10.11.0 depends on primitive-0.5.3.0 which failed to install.
void-0.6.1 depends on text-1.2.0.0 which failed to install.
┌─[ken][Kens-MacBook-Pro][±][master ✓][2.1.2][~/ksheedlo/xkcd936]
└─▪ brew search gmp
gmp
homebrew/versions/gmp4
┌─[ken][Kens-MacBook-Pro][±][master ✓][2.1.2][~/ksheedlo/xkcd936]
└─▪ brew info gmp
gmp: stable 6.0.0a (bottled)
http://gmplib.org/
/usr/local/Cellar/gmp/6.0.0a (15 files, 3.2M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/gmp.rb
==> Options
--32-bit
Build 32-bit only
--c++11
Build using C++11 mode
┌─[ken][Kens-MacBook-Pro][±][master ✓][2.1.2][~/ksheedlo/xkcd936]
└─▪ brew install gmp
Warning: gmp-6.0.0a already installed
As it stands, password strength is a function of how many entries are in the word dictionary, and how many words are to be used in the password. This is used to compute the "total entropy" estimate.
A nice feature would be to be able to specify instead what the minimum acceptable password entropy is, and have the password length be whatever it needs to be to meet that requirement.
This shouldn't be too hard. Modify the Configuration structure:
cfgNumWords :: Int
So that it instead looks like:
data Strength = Length Int
| MinEntropy Double
...
cfgStrength :: Strength
Then fix the entropy/length calculation in main. You could even define a function like:
-- From the specified password strength and number of words in the dictionary,
-- compute a (numwords, entropy) pair of the password length and its entropy
lengthAndEntropy :: Strength -> Int -> (Int, Double)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.