Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (42 sloc) 1.55 KB

Crypt3

Author

Poul-Henning Kamp

License

Apache 2.0

Copyright

2002 © Poul-Henning Kamp

DESCRIPTION

Crypt3 is a pure ruby version of crypt(3) –a salted one-way hashing of a password.

Supported hashing algorithms are: md5, sha1, sha256, sha384, sha512, rmd160. Only the md5 hashing algorithm is standard and compatible with crypt(3); the others are non-standard.

FEATURES/LIMITATION

  • Standard compliant crypt(3) implementation

  • Written in Ruby

  • Depends on Ruby's standard digest libraries

  • Supports alternate hashing algorithms

RESOURCES

RELEASE NOTES

Please see HISTORY file.

SYNOPSIS

Crypt3 provides a module method call crypt.

Crypt3.crypt('pass')

It will return an encypted string, something like:

'$1$YeNsbWdH$wvOF8JdqsoiLix754LTW90'

The validitly of which can ensured it using check:

Crypt3.check('pass', '$1$YeNsbWdH$wvOF8JdqsoiLix754LTW90')

See the RDoc API for further details and options.

INSTALLATIOPN

To install with RubyGems simply open a console and type:

gem install crypt3

Site installation requires Setup.rb (gem install setup), then download the tarball package and type:

tar -xvzf crypt3-1.0.0.tar.gz
cd crypt3-1.0.0
sudo setup.rb all

Windows users use 'ruby setup.rb all'.

LICENSE

Copyright © 2009 Poul-Henning Kamp

This program is ditributed unser the terms of the Apache 2.0 license.

See COPYING.rdoc and APACHE2.txt for details.