Skip to content

Commit 7f54adf

Browse files
committed
Merge pull request #5 from ndemonner/patch-1
Fix m_cost check
2 parents 34b1915 + 865d62a commit 7f54adf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/argon2.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def initialize(options = {})
1111
@t_cost = options[:t_cost] || 2
1212
raise ArgonHashFail, "Invalid t_cost" if @t_cost < 1 || @t_cost > 10
1313
@m_cost = options[:m_cost] || 16
14-
raise ArgonHashFail, "Invalid m_cost" if @t_cost < 1 || @t_cost > 31
14+
raise ArgonHashFail, "Invalid m_cost" if @m_cost < 1 || @m_cost > 31
1515
@salt = options[:salt_do_not_supply] || Engine.saltgen
1616
@secret = options[:secret]
1717
end

0 commit comments

Comments
 (0)