Grails 1.1 onwards has 'encodeAsMD5' available on Strings -- is there a way to provide a salt for the function?
Typical usage:
${myString.encodeAsMD5()}
Another option would be to use the Apache DigestUtils class.
I'm not using this to do password hashing -- instead, I'm using it for a verification mechanism to determine when a request was created and how much time elapsed when the response was received.
To start out, I encrypt the date/time of when a request was initially created and pass it over to the client. Later when the client sends some data back, it includes the original hash value which is then used in determining how much time has passed.