|
-
Jan 9th, 2009, 06:44 AM
#1
Thread Starter
New Member
[RESOLVED] Encrypt in Vb6 Decrypt in c#
Hi,
I have a VB6 application that should encrypt a string using a public key and a C# application decrypt using a private key.
Following situation. I created a Certificate containing a public and a private key. in my certstore and exported the keys to files ( .pfx,.cer )
so basicly i have the methods in vb to decrypt a string but only with .prk and .pbk files but i cant find a way to get the keys stored in the .pfx file out to use them with my crypto api calls.
So im pretty new to all this crypto stuff and maybe im doing something completley wrong here... so just forgive me if im talking bs here 
thanks in advance
as
-
Jan 9th, 2009, 08:02 AM
#2
Thread Starter
New Member
Re: Encrypt in Vb6 Decrypt in c#
ok i just found ( after hours of googling around ) a much simpler access to my issue using the RSACryptoServiceProvider ... so now i have a much simpler problem: when I encrypt the string and the decrypt it everythings just fine... but if i want to save the encrypted string to a file ( to read the file in my c# app afterwards ) it only saves Questionmarks : "?????????????????????????????????"
why is that? and much more important... how to avoid that??
-
Jan 9th, 2009, 08:38 AM
#3
Re: Encrypt in Vb6 Decrypt in c#
Maybe you should show us the code you are using to make the file, and to read the file ?
-
Jan 9th, 2009, 08:53 AM
#4
Thread Starter
New Member
Re: Encrypt in Vb6 Decrypt in c#
well it was just a noob failure of mine i forgot to convert the byte array to a string before writing it to a file. anyway im writing it to the database now. everything works fine.
thanks for your reply anyway
bye
as
-
Jan 9th, 2009, 11:12 AM
#5
Re: Encrypt in Vb6 Decrypt in c#
Dont forget to Resolve your thread from the "Thread Tools menu > Mark Thread as Resolved" so others will know your question has been answered.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|