Software /
code /
prosody
Comparison
util-src/hashes.c @ 5768:c892709f035d
util.hashes: Correct argument order
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 06 Aug 2013 14:31:20 +0200 |
parent | 5576:7656b9f06bb5 |
child | 5774:6ef79af0c445 |
comparison
equal
deleted
inserted
replaced
5767:3a30ad76a86a | 5768:c892709f035d |
---|---|
83 union xory k_ipad, k_opad; | 83 union xory k_ipad, k_opad; |
84 | 84 |
85 if (key_len > 64) { | 85 if (key_len > 64) { |
86 desc->Init(desc->ctx); | 86 desc->Init(desc->ctx); |
87 desc->Update(desc->ctx, key, key_len); | 87 desc->Update(desc->ctx, key, key_len); |
88 desc->Final(desc->ctx, hashedKey); | 88 desc->Final(hashedKey, desc->ctx); |
89 key = (const char*)hashedKey; | 89 key = (const char*)hashedKey; |
90 key_len = desc->digestLength; | 90 key_len = desc->digestLength; |
91 } | 91 } |
92 | 92 |
93 memcpy(k_ipad.bytes, key, key_len); | 93 memcpy(k_ipad.bytes, key, key_len); |