Class: PwdHash::Hash
- Inherits:
-
Object
- Object
- PwdHash::Hash
- Defined in:
- lib/pwdhash/pwdhash.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
- #contains_non_alphanumeric? ⇒ Boolean
-
#initialize(realm, password) ⇒ Hash
constructor
A new instance of Hash.
- #size ⇒ Object
Constructor Details
#initialize(realm, password) ⇒ Hash
Returns a new instance of Hash.
55 56 57 58 59 |
# File 'lib/pwdhash/pwdhash.rb', line 55 def initialize(realm, password) @realm, @password = realm, password hash! remove_base64_pad_character end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
54 55 56 |
# File 'lib/pwdhash/pwdhash.rb', line 54 def hash @hash end |
Instance Method Details
#contains_non_alphanumeric? ⇒ Boolean
63 64 65 |
# File 'lib/pwdhash/pwdhash.rb', line 63 def contains_non_alphanumeric? @password =~ /\W/ end |
#size ⇒ Object
60 61 62 |
# File 'lib/pwdhash/pwdhash.rb', line 60 def size @password.length + '@@'.length end |