ToringoRSA.Sign 64 bit Replacement

I’m trying to update a big project to 64 bits, and have found one roadblock - the ToringoCrytpo Plugin. Though still online http://www.toringo.com/cryptodoc/index.htm it’s not been updated in 5 years so I’m guessing it’s dead and no 64 bit version is coming.

Most of the functions are fairly easy to translate over to Xojo’s Crypto module (Classic) http://developer.xojo.com/crypto or the newer Xojo.Crypto module http://developer.xojo.com/xojo-crypto

But I’m stuck on one piece: replacing ToringoRSA.Sign() http://www.toringo.com/cryptodoc/html/rsa.htm#SignMethod

As I look into this, I think that the reason I’m having trouble is that I don’t understand ToringoRSA.Sign() or perhaps it’s doing the wrong thing.

Toringo’s version of RSA.Sign requires you to provide the plainText, and both the private and public keys (which is odd - most RSA sign functions only require the Private key)
Toringo’s version of RSA.Verify requires the signature and public key (which is normal) but also returns a copy of the plainText that you signed (which is also odd - most RSA verify functions only return a boolean if the hash of the plainText matches or doesn’t).

In other words, it looks like Toringo’s Sign/Verify code is actually doing something else (more like an Encrypt/Decrypt) operation, as it allows you to recover the original PlainText.

My problem is that I made use of this feature (bug?) and now I’ve got legacy code out there which will break if I can’t emulate using Xojo’s Crypto module.

Anyone else solved this issue?