Menu

SHA-512 not working correctly on Safari

Help
Anonymous
2012-08-13
2012-12-11
  • Anonymous

    Anonymous - 2012-08-13

    Code used to test functionality:

    var hash = pidCrypt.SHA512(passcat);

    Using the test input of:
    var passcat = "test:test";

    Ruby:
    8b537fa1b7db5287ab508e3a108f1a7be11058e37476ca6507a574feb02e71e7e70ffb14657beaae3600c86a71048700f4d41e08996ccb5a18686edbe6cf7e27
    Chrome:
    8b537fa1b7db5287ab508e3a108f1a7be11058e37476ca6507a574feb02e71e7e70ffb14657beaae3600c86a71048700f4d41e08996ccb5a18686edbe6cf7e27
    Firefox:
    8b537fa1b7db5287ab508e3a108f1a7be11058e37476ca6507a574feb02e71e7e70ffb14657beaae3600c86a71048700f4d41e08996ccb5a18686edbe6cf7e27
    Safari:
    9e743c45c0a06847e3efaad33664429598f0af24ad43ccf9db18179cc07c3d402adb1309111ac1e89c21dd2d0a5ddff4c06b03c09c8a0b7441dbc72c1009c281

    Subsequent runs of the hash produce:
    c53f40e46c0e96ebd751b87268769dc552a73de325407352b4fb0c105c1087512849be29d41ba1ab8f05bedd4df78f2fdb8a213d3639a9032debed07929e5845

    So, something is fishy in Apple land… I have been using pidCrypt successfully for a few years, but this one suddenly appeared in the past 6 months. I tried a competing library (jsSHA), and it gets a very similar result, although subsequent runs give different results.

     
  • Jonah (pidder)

    Jonah (pidder) - 2012-08-14

    You are right, something is very fishy with Safari ever since version 5.1.4 of that browser, see https://discussions.apple.com/message/18001083. Sadly, Apple didn't feel compelled to comment yet.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.