diff options
author | Azul <azul@riseup.net> | 2012-10-05 16:34:07 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2012-10-05 16:34:07 +0200 |
commit | b35bf766a6bbd5857853ac25d27091a7cf566539 (patch) | |
tree | eb5e2e39fd1380215e7606a10c12da771f98582d /lib/srp | |
parent | 41ef9b34b7cfb94574868db401aaf17b82733670 (diff) |
bugfix - zero padded salts do not break login anymore
Diffstat (limited to 'lib/srp')
-rw-r--r-- | lib/srp/util.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/srp/util.rb b/lib/srp/util.rb index 1e4beac..3bed1d3 100644 --- a/lib/srp/util.rb +++ b/lib/srp/util.rb @@ -41,7 +41,7 @@ d15dc7d7b46154d6b6ce8ef4ad69b15d4982559b297bcf1885c529f566660e5 # Hashes the hex args def sha256_hex(*args) - h = args.join('') + h = args.map{|a| a.length.odd? ? "0#{a}" : a }.join('') sha256_str([h].pack('H*')) end |