2

I need to generate RSA encoded string from Excel 2007 document using VBA, but have no idea how to do this(I have public key, string will be decoded in .NET). Please help.

Thanks

drizzt
  • 2,756
  • 6
  • 27
  • 41
  • You could solve this another way if you know the code for how to encrypt in .Net. Then you would create a .Net class with a Encrypt function, expose that class as a COM object and call that function via COM. This method is often helpful if something is easy using .Net but difficult using VBA or VB6. – GTG Nov 12 '11 at 22:00

1 Answers1

2

This website has a sample for doing it with a module (basModExp.bas)that you need to download.

Then its just calling the method mpModExp with the message, the Exponent and modulus (all in baseHex)

Conrad Frix
  • 51,984
  • 12
  • 96
  • 155
  • thanks it seems to be working(according to examples in code) but I don`t know how to use it, I really tried but for example for keys 384bits long all examples failed, can you help me pls? – drizzt Nov 12 '11 at 01:02