Class: Zxcvbn::Score

Inherits:
Object
  • Object
show all
Defined in:
lib/zxcvbn/score.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Score

Returns a new instance of Score.



6
7
8
9
10
11
12
13
# File 'lib/zxcvbn/score.rb', line 6

def initialize(options = {})
  @entropy            = options[:entropy]
  @crack_time         = options[:crack_time]
  @crack_time_display = options[:crack_time_display]
  @score              = options[:score]
  @match_sequence     = options[:match_sequence]
  @password           = options[:password]
end

Instance Attribute Details

#calc_timeObject

Returns the value of attribute calc_time.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def calc_time
  @calc_time
end

#crack_timeObject

Returns the value of attribute crack_time.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def crack_time
  @crack_time
end

#crack_time_displayObject

Returns the value of attribute crack_time_display.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def crack_time_display
  @crack_time_display
end

#entropyObject

Returns the value of attribute entropy.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def entropy
  @entropy
end

#match_sequenceObject

Returns the value of attribute match_sequence.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def match_sequence
  @match_sequence
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def password
  @password
end

#patternObject

Returns the value of attribute pattern.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def pattern
  @pattern
end

#scoreObject

Returns the value of attribute score.



3
4
5
# File 'lib/zxcvbn/score.rb', line 3

def score
  @score
end