Do you mind using blowfish? Is this from inside an Xlate? I have a proc which will encrypt using blowfish. I know I have one for inside and Xlate and I think I have one for TPS UPoC.
If blowfish is not appropriate, then Tcl has MD% and other cipher capability though I have not written anything for them.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.