User bio
404 bio not found
Member since Oct 9, 2018
Posts:
Replies:
Joel Espinoza · Oct 11, 2022 go to post

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!

Joel Espinoza · Dec 7, 2020 go to post

In addition to Scott answer, I need to add one additional parameter:

databaseName=<database>;trustServerCertificate=true;domain=<domain>;useNTLMv2=true;cacheMetaData=true;prepareSQL=2

Thanks for the post Scott, it was very helpful!

Regards, Joel

Open Exchange applications:
Certifications & Credly badges:
Followers:
Following: