Login  Register

Re: Retrieve MD5-hash in macro

Posted by dscho on Jan 29, 2011; 1:58pm
URL: http://imagej.273.s1.nabble.com/Retrieve-MD5-hash-in-macro-tp3685888p3685889.html

Hi,

On Sat, 29 Jan 2011, Ingo Bartholomaeus wrote:

> is there a way (e.g. using eval()) to retrieve the MD5-hash (or SHA-1)
> of a given string using the macro language?

You have two options: resort to Javascript and using
java.security.MessageDigest or reimplementing the algorithm in the macro
language (e.g. by converting a Javascript implementation like this:
http://www.movable-type.co.uk/scripts/sha1.html).

Ciao,
Johannes