Skip to content

Commit

Permalink
Use .odd? instead of modulo
Browse files Browse the repository at this point in the history
  • Loading branch information
grempe committed May 13, 2016
1 parent e3e6c52 commit badfb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/srp/srp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def calc_H_AMK(xaa, xmm, xkk, hash_klass)

def num_to_hex(num)
hex_str = num.to_s(16)
even_hex_str = hex_str.length % 2 == 1 ? '0' + hex_str : hex_str
even_hex_str = hex_str.length.odd? ? '0' + hex_str : hex_str
even_hex_str.downcase
end

Expand Down

0 comments on commit badfb70

Please sign in to comment.