> When I attempt to get a SHA message digest value for a specific string
> using Java and Openssl, I get a different value. I was hoping that I
> could use Openssl to validate the Java result, but have not gotten them
> to agree. It does work for md5...
>
> Here is an example.
>
> For the sample string: "ABCDFGHIJK"
>
> md5 hash
> Java:     64:46:e8:25:e0:d9:f6:37:9d:02:67:e0:5c:d8:ac:0d
> Openssl:  64:46:e8:25:e0:d9:f6:37:9d:02:67:e0:5c:d8:ac:0d
>
> sha hash:
>
> Java:     6d:f4:55:0f:f1:8b:28:e8:d3:19:78:77:59:cd:55:8f:95:54:63:b5
> Openssl:  f5:b0:a4:7e:b1:5b:c6:d1:c7:6f:79:84:b3:27:8e:d0:70:63:23:f5
>
> Does anyone know of a document has examples of sha hashes given input,
> that I can use to validate my code?

        What algorithm are you using? The term "sha hash" could refer to any number
of related algorithms. My bet is that you are using two different such
algorithms, like SHA1 in Java and SHA0 in OpenSSL, or something similar.

        DS



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to