Currently, I'm using encode method to encode password, here it is:
static encode = { String s ->
print(s)
MessageDigest md = MessageDigest.getInstance('SHA')
print(md)
md.update s.getBytes('UTF-8')
def result = Base64.encodeBase64 md.digest()
new String(result, "UTF-8");
}
So, is there any possible ways to decrypt it? I tried decodeBase64()
and got result:
[64, -67, 0, 21, 99, 8, 95, -61, 81, 101, 50, -98, -95, -1, 92, 94, -53, -37, -66, -17]
Am I close to success? How can convert it to string?