The first thing, which comes to mind is using the wwDotnet Bridge, to be able to use the original .NET class. See
When you want to be able to use assemblies and also even think about Dotnet migration as a future path, the Dotnet bridge is a good way of getting there and starting with it, you'll once need to deep dive into using the bridge, that's not much work but has some hurdles. The bigger issue - though it doesn't seem so - is ensuring a .NET framework version exists. So a related setup strategy like ClickOnce is useful to let your setup detect this and even make it an automatic side installation (it's not the only way, but Craig Boyd has shown how to use ClickOnce here: )
I say this because you can nowadays have upward compatibility issues with .NET usage, ie you might need to ensure an older .NET framework to be present to use a class the way your code does. MS has not dropped the virtue of backward compatibility, but like many other major development platforms (JAVA, PHP and more modern web development stacks) MS also has adopted the virtue of letting things deprecate and become invalid to not need to maintain all code ever implemented and keep all that safe. That demands upgrades of many aspects you'd rather never need to touch again once they're done.
Another option, though no gateway to that .net class itself, is the samples of using the crypto API coming with VFP9 itself: _crypt.vcx in the FFC folder. I don't think just a provider change, so the correct init parameters will make it use this new functionalities of RFC2898, so you'd need to find new API functions to add to the Aapideclarations method and code using the API functions in there.
The major downside of that is, a lot was added to the crypto API since the time VFP9 was released since we don't get any more VFP updates we also don't get FFC class updates that keep up with those changes. You'll not need to extend the library to make use of all new features, you can aim for that single functionality, but its a task to identify which crypto API extension corresponds to that .NET assembly. It's likely not just another cryptographic provider you could use with the unchanged FFC class by simply specifying it as Init() parameter. So it's unknown how much you'll need to dive into MSDN library documentation to get to this specific functionality.
I haven't deep dived into both ways. It would be obviously simpler in and for this moment, to use the Dotnet Bridge and I recommended it previously anyway (see thread184-1734668).
Neither way will be done in minutes. So I'd spend a few hours understanding both ways and their consequences. To be clear, when you pick the Dotnet bridge way, there are two ways to keep your code working:
1. Ensure a library version that works is present.
2. Adapt your code when the assembly changes not downward compatible.
In any case, it also means when you have customers, that only buy one version of your software and don't upgrade often or ever, your software may stop working with n incompatible .net framework change not under your control. That's also not impossible when you use the API without going through .NET, but I'd say an API usage is less likely to break. The point in question still is, whether the RFC related function is available as usual DLL function you can declare in VFP.
You don't have that much of .NET innovation pressure by only using one assembly, but all advanced platforms today have that pressure on top of keeping up with any changes law and users want from you. And even in PHP you still see developers failing to see how PHP mysql functions have deprecated and need to be replaced by mysqli or pdo. No matter if you know that or not: Just notice even with long grace periods (many years a language supports old and new ways of doing things) code often sticks to old ways and that's not even about the usual technical debt developers are responsible for themselves.
Bye, Olaf.
Olaf Doschke Software Engineering