git ssb

0+

dangerousbeans / %aPBe2k3ugtjBr4rrsU1…



Commit 0bda454dcefd1eed459b7f29b0327fd36609cf14

Ok, RDoc doesn't like pretty comments.

git-svn-id: http://bcrypt-ruby.rubyforge.org/svn/trunk@14 b1e0f299-433e-4bb3-9895-84128a6cfb6a
codahale committed on 2/28/2007, 8:13:16 AM
Parent: 8b90c357e99debc6e49cef5bf027c1034d12a097

Files changed

lib/bcrypt.rbchanged
lib/bcrypt.rbView
@@ -14,10 +14,12 @@
1414 end
1515
1616 # A Ruby wrapper for the bcrypt() extension calls.
1717 class Engine
18- DEFAULT_COST = 10 # The default computational expense parameter.
19- MAX_SALT_LENGTH = 16 # Maximum possible size of bcrypt() salts.
18 + # The default computational expense parameter.
19 + DEFAULT_COST = 10
20 + # Maximum possible size of bcrypt() salts.
21 + MAX_SALT_LENGTH = 16
2022
2123 # C-level routines which, if they don't get the right input, will crash the
2224 # hell out of the Ruby process.
2325 private_class_method :__bc_salt
@@ -90,12 +92,16 @@
9092 # @db_password == "my grand secret" #=> true
9193 # @db_password == "a paltry guess" #=> false
9294 #
9395 class Password < String
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.
96 + # The hash portion of the stored password hash.
97 + attr_reader :hash
98 + # The salt of the store password hash (including version and cost).
99 + attr_reader :salt
100 + # The version of the bcrypt() algorithm used to create the hash.
101 + attr_reader :version
102 + # The cost factor used to create the hash.
103 + attr_reader :cost
98104
99105 class << self
100106 # Hashes a secret, returning a BCrypt::Password instance. Takes an optional <tt>:cost</tt> option, which is a
101107 # logarithmic variable which determines how computational expensive the hash is to calculate (a <tt>:cost</tt> of

Built with git-ssb-web