[TIMOB-1789] iPhone implementation of SHA-1 algorithm does not work correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:10.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M05 |
Components | iOS |
Labels | authentication, ios, iphone, regression, sha1 |
Reporter | Jesse Domack |
Assignee | Reggie Seagraves |
Created | 2011-04-15T03:02:27.000+0000 |
Updated | 2011-04-17T01:57:10.000+0000 |
Description
The iPhone implementation of the sha-1 algorithm does not work correctly. It only returns the first 32 characters of the hash instead of the full 40. Perusing the code, I found that the error lies in the convertToHex function in UtilsModule.m. This function is only designed to return the first 32 characters, and currently ignores anything else. As a temporary work-around, I added a convertToHex40 function which does the exact same thing, only it is configured for 40 characters. While I realize this is not an ideal fix, it solves my problem temporarily.
On a side note, the Android implementation of this function works great.
Thanks for your help in advance.
Sincerely,
Jesse Domack
Attachments
File | Date | Size |
---|---|---|
utilsmodule.m | 2011-04-15T03:02:27.000+0000 | 3602 |