Giter Site home page Giter Site logo

shoenig / bcrypt-tool Goto Github PK

View Code? Open in Web Editor NEW
42.0 42.0 6.0 29 KB

A CLI tool for bcrypt - hash a password, determine if password matches a hash, compute cost of hash

License: MIT License

Go 85.71% Makefile 14.29%
bcrypt cli cost hacktoberfest hash tool

bcrypt-tool's People

Contributors

cjdurkin avatar dependabot[bot] avatar shoenig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bcrypt-tool's Issues

too slow?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.