OK_Decrypt ( Text ; Key )
Decrypt data encrypted with OK_Encrypt CF
Average rating: 4.6 (32 votes) Log in to vote
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Decrypts text encrypted with the "OK_Encrypt" CF
Aug 23, 2014
|Strange... the Encrypt half of the function seems identical to this even to having the Decrypt comments... Does that mean we only need one function to do both, encrypt and decrypt?|
Aug 25, 2014
Yep, they've essentially the same function, except in the Decrypt version you subtract the key letter from the ciphertext, and in the Encrypt version you add the keyletter to the ciphertext.
v = Char ( Code ( Left ( text ; 1 ) ) - Code (Middle (key ; i;1) ) );
v = Char ( Code ( Left ( text ; 1 ) ) + Code (Middle (key ; i;1) ) );
But you're right, I didn't change it in the comment text - sloppy of me. I've fixed it now.
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.