https://github.com/rubyworks/crypt3
Unix Crypt 3 in Ruby
https://github.com/rubyworks/crypt3
Last synced: 6 months ago
JSON representation
Unix Crypt 3 in Ruby
- Host: GitHub
- URL: https://github.com/rubyworks/crypt3
- Owner: rubyworks
- License: bsd-2-clause
- Created: 2009-09-15T13:48:12.000Z (over 16 years ago)
- Default Branch: master
- Last Pushed: 2013-11-21T20:18:19.000Z (about 12 years ago)
- Last Synced: 2024-11-18T09:14:07.282Z (about 1 year ago)
- Language: Ruby
- Homepage: http://rubyworks.github.com/crypt3
- Size: 585 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Crypt3
[Website](http://rubyworks.github.com/crypt3) ·
[Report Issue](http://github.com/rubyworks/crypt3/issues) ·
[Source Code](http://github.com/rubyworks/crypt3)
[](http://badge.fury.io/rb/crypt3)
[](http://travis-ci.org/rubyworks/crypt3)
## [About](#about)
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](#features)
* Standard compliant crypt(3) implementation
* Supports alternate hashing algorithms
* Written in Ruby (but depends on Ruby's standard digest libraries)
## [Installing](#installing)
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'.
## [Basic Usage](#usage)
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 [API Documentation](http://rubydoc.info/gems/crypt3/frames) for further
details and options.
## [Copyrights](#copyright)
Copyright © 2009 Poul-Henning Kamp
This program is ditributed under the terms of the [BSD-2-Clause](http://opensource.org/licenses/BSD-2-Clause)
license.
See LICENSE.txt for full text.