Hi Steve,
St3ve schrieb:
> I am using the "password editor" for setting an user password, hashed with
> MD5 algorithm.
>
> Typing the password "test", the password preview section in the editor shows
> "{MD5}CY9rzUYh03PK3k6DJie09g=="
>
> and Password (Hex): "098f6bcd4621d373cade4e832627b4f6".
>
> When I query the server to get the password hash, I receive the one that is
> listed as the password preview.
>
> What algorithm do I need to use to get the Hex Format?
The MD5 algorithm produces 128 bit hash, that is a byte[] with size 16.
The preview and the stored value is the Base64 [1] encoding of this
byte[], prefixed with {MD5}. The "Hex" is just the hexadecimal
representation [2] of each byte.
Hope that help,
Stefan
[1]
http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Base64.html
[2]
http://commons.apache.org/codec/apidocs/org/apache/commons/codec/binary/Hex.html