To encrypt to MD5 (as javascript, unix and others) I writed this classmethod, using information found here, and works very well.

ClassMethod Encripta(pass) As %String
{
set intermedio = ##class(%SYSTEM.Encryption).MD5Hash(pass)
set md5HashHex = ""
for i=1:1:$Length(intermedio) {
set hexaIntermedio = $Zhex($Ascii($Extract(intermedio,i)))
if $Length(hexaIntermedio)=1 {
set hexaIntermedio = "0" _ hexaIntermedio
}
set md5HashHex = md5HashHex _ hexaIntermedio
}
return $ZConvert(md5HashHex,"L")
}

Just need to use " d Encripta("word")"

I hope could be useful!

Joe!