git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



Commit 024b702838a0d932e17d91cbd0a1c939c9c3a296

Cleaned up the comments a bit.

git-svn-id: http://bcrypt-ruby.rubyforge.org/svn/trunk@12 b1e0f299-433e-4bb3-9895-84128a6cfb6a
codahale committed on 2/28/2007, 6:35:58 AM
Parent: b53ba3beeb9cfd520ffe210bc37fed33fe4407da

Files changed

lib/bcrypt.rbchanged
lib/bcrypt.rbView
@@ -7,14 +7,11 @@
77 # A Ruby library implementing OpenBSD's bcrypt()/crypt_blowfish algorithm for
88 # hashing passwords.
99 module BCrypt
1010 module Errors # :nodoc:
11- # The salt parameter provided to bcrypt() is invalid.
12- class InvalidSalt < Exception; end
13- # The hash parameter provided to bcrypt() is invalid.
14- class InvalidHash < Exception; end
15- # The cost parameter provided to bcrypt() is invalid.
16- class InvalidCost < Exception; end
11 + class InvalidSalt < Exception; end # The salt parameter provided to bcrypt() is invalid.
12 + class InvalidHash < Exception; end # The hash parameter provided to bcrypt() is invalid.
13 + class InvalidCost < Exception; end # The cost parameter provided to bcrypt() is invalid.
1714 end
1815
1916 # A Ruby wrapper for the bcrypt() extension calls.
2017 class Engine
@@ -93,16 +90,12 @@
9390 # @db_password == "my grand secret" #=> true
9491 # @db_password == "a paltry guess" #=> false
9592 #
9693 class Password < String
97- # The hash portion of the stored password hash.
98- attr_reader :hash
99- # The salt of the store password hash (including version and cost).
100- attr_reader :salt
101- # The version of the bcrypt() algorithm used to create the hash.
102- attr_reader :version
103- # The cost factor used to create the hash.
104- attr_reader :cost
94 + attr_reader :hash # The hash portion of the stored password hash.
95 + attr_reader :salt # The salt of the store password hash (including version and cost).
96 + attr_reader :version # The version of the bcrypt() algorithm used to create the hash.
97 + attr_reader :cost # The cost factor used to create the hash.
10598
10699 class << self
107100 # Hashes a secret, returning a BCrypt::Password instance. Takes an optional <tt>:cost</tt> option, which is a
108101 # logarithmic variable which determines how computational expensive the hash is to calculate (a <tt>:cost</tt> of

Built with git-ssb-web