MD5 hash calculates differently on server

前端 未结 5 1972
一个人的身影
一个人的身影 2020-12-16 19:24

I am running some code that I have written in C which calls the md5 hashing functionality from a hashing library that someone else wrote (md5.c & md5.h). The odd behavi

5条回答
  •  天涯浪人
    2020-12-16 20:21

    Sorry, no. If I compile that and run it on my linux x86 box it produces the same result as the md5sum utility:

    peregrino:$ md5sum csrc/Md5.c 
    d27fd5f04426a3ccb2390d7517f21b9c  csrc/Md5.c
    peregrino:$ bin/Md5 csrc/Md5.c 
    d27fd5f04426a3ccb2390d7517f21b9c csrc/Md5.c
    

    On my x64 box:

    sandiego:$ bin/Md5 src/Md5.c 
    09679964608e3335c5c3e14572373eef src/Md5.c
    

    So it does seem to be a 64 bit issue, rather than a linux issue.

提交回复
热议问题