|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to decrypt CAPICOM data i .NET 2.0I have CAPICOM encrypted data. Data cames from VB6 application (see sample bellow). Now I want to decrypt this data in VB.NET (or C#). Are there native .NET 2.0 library to decrypt CAPICOM data or I must have import CAPICOM interop and use this one? Example of VB.NET encryption: Dim message As New EncryptedData message.Content = txtPrefix.Text & cbId.Text & txtHodnota message.SetSecret txtPwd.Text message.Algorithm.Name = CAPICOM_ENCRYPTION_ALGORITHM_DES CryptMsg message.Encrypt Example of VB.NET decryption: Set message = New EncryptedData message.SetSecret mvarKreditVerze message.Decrypt "Key" DecryptMsg = message.Content Karel Kral My understanding is that the CAPICOM encryption format is proprietary to
CAPICOM (unliked their signed and enveloped structures, which are standard), so you must use CAPICOM to decrypt as well. You can do this from .NET via COM Interop. Joe K. -- Show quoteHide quoteJoe Kaplan-MS MVP Directory Services Programming Co-author of "The .NET Developer's Guide to Directory Services Programming" http://www.directoryprogramming.net -- "Karel Kral" <kral.k***@volny.cz> wrote in message news:%23y7VPxxBHHA.4680@TK2MSFTNGP04.phx.gbl... > Hello, > I have CAPICOM encrypted data. Data cames from VB6 application (see > sample bellow). Now I want to decrypt this data in VB.NET (or C#). > > Are there native .NET 2.0 library to decrypt CAPICOM data or I must have > import CAPICOM interop and use this one? > > Example of VB.NET encryption: > Dim message As New EncryptedData > message.Content = txtPrefix.Text & cbId.Text & txtHodnota > message.SetSecret txtPwd.Text > message.Algorithm.Name = CAPICOM_ENCRYPTION_ALGORITHM_DES > CryptMsg message.Encrypt > > > Example of VB.NET decryption: > Set message = New EncryptedData > message.SetSecret mvarKreditVerze > message.Decrypt "Key" > DecryptMsg = message.Content > > Karel Kral Thanks, it is I was worry about. So I must to say goodbye to XCopy
deployment (CAPICOM must me registered ActiveX). On 13.11.2006 16:14, Joe Kaplan wrote: Show quoteHide quote > My understanding is that the CAPICOM encryption format is proprietary to > CAPICOM (unliked their signed and enveloped structures, which are standard), > so you must use CAPICOM to decrypt as well. You can do this from .NET via > COM Interop. > > Joe K. > Or say goodbye to CAPICOM, yes. Sorry. Personally, I'd try to avoid using
this feature of CAPICOM as it is proprietary and just asking for trouble. I'd use the Enveloped data support with EnvelopedCms in .NET 2.0 (or the crypto message stuff in crypto API for native support). You may be stuck with an existing thing you can't change though. Joe K. -- Show quoteHide quoteJoe Kaplan-MS MVP Directory Services Programming Co-author of "The .NET Developer's Guide to Directory Services Programming" http://www.directoryprogramming.net -- "Karel Kral" <kral.k***@volny.cz> wrote in message news:%23CR1wC8BHHA.4908@TK2MSFTNGP03.phx.gbl... > Thanks, it is I was worry about. So I must to say goodbye to XCopy > deployment (CAPICOM must me registered ActiveX). > > On 13.11.2006 16:14, Joe Kaplan wrote: >> My understanding is that the CAPICOM encryption format is proprietary to >> CAPICOM (unliked their signed and enveloped structures, which are >> standard), >> so you must use CAPICOM to decrypt as well. You can do this from .NET >> via >> COM Interop. >> >> Joe K. >> > You may be stuck with an existing thing you can't change though. Yes, this is exactly my case. The bigger part of our app is VB6 and mustto use CAPICOM. So newer .NET part must adapt to these crypted data data. Joe Kaplan wrote: Show quoteHide quote > Or say goodbye to CAPICOM, yes. Sorry. Personally, I'd try to avoid using > this feature of CAPICOM as it is proprietary and just asking for trouble. > I'd use the Enveloped data support with EnvelopedCms in .NET 2.0 (or the > crypto message stuff in crypto API for native support). You may be stuck > with an existing thing you can't change though. > > Joe K. >
how to add "Authorization: Basic" for a web service call
Winform: Call a vbscript with elevated privileges FullTrust on network drive Do i need to got Https:// throught the website ??? Why am I getting errors when I want to rebuild the TreeView contro Login error when opening a deployed project User creation.... Forms Authentication with Active Directory, login control crashes Security Exception Is there a function that I can call to validate a domain? |
|||||||||||||||||||||||