Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I Encrypt and Decrypt strings in both C# and VBA code such as I need to use same passkey and both codes should generate same encrypted sequence, so that I can use encrypted key in VBA to decrypt in C# and vice-versa.

Any help on this is appreciated.

Thank you.
Posted

A little research on your own behalf is required first.

You will find several suggestions in these CP articles[^]
 
Share this answer
 
Use the same encryption algorithm.

There is an example of AES for VBA here: http://bytes.com/topic/access/insights/906850-aes-encryption-algorithm-vba-vbscript[^] and C# supports AES: https://msdn.microsoft.com/en-us/library/system.security.cryptography.aes(v=vs.110).aspx[^] so that is one way to go.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900