[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: Visual Basic and KeyImport
From:       Rob Mig <rjmr () MAILCITY ! COM>
Date:       1998-10-10 13:29:16
[Download RAW message or body]


 Jan:

Dealing with capi and  VB may be some times even darker tahn crypto itself. I didn't \
see your code yet but here goes some suggestions: 1) Verify the parameter type \
definitions for the capi functions parameters, mainly those that load the keyblob in \
memory, taht should be a string with defined length. b) Remember you should first \
load the keyblob form the file into memory. That string in memory should be exactly \
the same that was created by the CryptExportFunction, with no additives. c) I see \
you're storing additional info with the keyblob (kb length), remember to crop it when \
you load the kb to pass the original kb to the functions. You should have good \
reasons to add this additional info, but I think is better to save the original \
exported kb in a single file, and then load it with a VB function like get or \
something like that, then if you need the length you can apply a filelen to the kb \
file, or to the loaded string, and you are sure the kb in file is exactly the \
exported kb.

Rob.

--

On Thu, 8 Oct 1998 11:27:25    Jan Moeskops wrote:
> hello Crypies,
> 
> I have writen an app in VB that writes the length of the public echange >key blob \
> followed by the keyblob itself to file. Now I want to import >that key back into \
> the CSP. I have tried everything but I still get an >error on the CryptImportKey \
> function. Anyone out there that can help me >(or thinks my source might be \
> interesting)? Have a look! Thanks. 
> 
> Included are the source files and the file that containes the >length+keyblob. Put \
> this file on your desktop. 


Get your FREE E-mail at http://mailcity.lycos.com
Get your PERSONALIZED START PAGE at http://personal.lycos.com

----------------------------------------------------------------
Users Guide http://www.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic