1 points · by tcpipcowboy · 9y ago · 4 comments
I did see this note in the MUMPS help and will be digging into ANSI M to see if I can get more information:
$TRANSLATE() provides a tool for tasks such as changing case and doing encryption.
For examples of case translation, refer to the ^%LCASE and ^%UCASE utility routines.
Other common issues in healthcare involve using ssh and TLS to encrypt TCP/IP data being transmitted over the network, as well as use of PGP or one-way encrypting for login passwords, such as VistA's ACCESS CODE and VERIFY CODE.
In reviewing $TRANSLATE()closer, it's not exactly what I'm looking for, either, although this and $ZTRANSLATE() may be as close as I can get for my example from what I've read thus far. Appreciate the reply!
You can pass data to this other process, but the ANSI MUMPS standard does NOT require that the data passed by inter-process communication channels be encrypted.
Since GT.M is open source, it is an interesting idea to encrypt this data and decrypt it when receiving it. I'll bring it up to some friends.
Another idea worth examining might be to use the Foreign subroutine interface both in Cache and GT.M systems. Thanks for suggesting this.
Just in the research I've done so far, I'm looking at something along the lines of the below, but I would love to see more advanced and complete snippets.
;--
; New, define variables
;--
N cryptKey,derivedKey,cipher,plainText
S cryptKey="Private Encryption Key"
S derivedKey=$$zderiveKey(cryptKey,1,1)
S plainText'"Hello, Crypto World!"
;--
; Encrypt plainText
;--
S cipher=$$zaesenc(plainText,derivedKey)
;--
; Display decrypted text
;--
W #
W !,"Encrypted: ",cipher
W !!,"Decrypted: ",$$zaesdec(cipher,derivedKey)
Q
I'll look into the Foreign subroutine interface. Anything like Haskell's FFI?