shoenig / bcrypt-tool Goto Github PK
View Code? Open in Web Editor NEWA CLI tool for bcrypt - hash a password, determine if password matches a hash, compute cost of hash
License: MIT License
A CLI tool for bcrypt - hash a password, determine if password matches a hash, compute cost of hash
License: MIT License
Also add some of the newer repository metafile contents
I wonder why Go's bcrypt is 1.5 times slower than Perl's one? Look (I don't use shell's time
for perl to exclude perl's startup time, which is much larger than Go's):
$ time bcrypt-tool hash '0123456789' 10
$2a$10$God/j.dxKvryLSZfCAziMuMeZBfV28Xu24G6liCxlQbCM3PNs17S.
real 0m0.073s
user 0m0.072s
sys 0m0.000s
$ perl -E '
use Crypt::Eksblowfish::Bcrypt qw(en_base64 bcrypt);
use Time::HiRes qw(time);
$t=time;
open my $rand, "<", "/dev/urandom" or die $!;
16 == sysread $rand, my $salt, 16 or die $!;
close $rand or die $!;
say bcrypt("0123456789", q{$2a$10$}.en_base64($salt));
say time-$t;
'
$2a$10$WgABAl2bimF7wAOpRebTL.FQdV4n8Ho0/cWA4pGas.PUKpQTbYAL6
0.0554509162902832
Well, to be 100% honest this Perl module is partially implemented in C, but, still, Go shouldn't be 1.5 times slower than C on such tasks, isn't it?
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.