Re: Using "ZCCryptEC161CreateContext" in ZC API Library.


[ Follow Ups ] [ BasicCard User Forum ]

Posted by zeitcontrol (217.87.0.53) on June 29, 2006 at 06:42:40:

In Reply to: Using "ZCCryptEC161CreateContext" in ZC API Library. posted by vutaviva on June 28, 2006 at 13:45:56:

It is quite complicated to combine .Net and native APIs. I strongly recommend using the "ZeitControl BasicCard Crypto Control" which is COM based and much more simple to use. E.g. this would reduce to (C#)
ZCCRYPTXLib.IzcEC161 ec161 = new ZCCRYPTXLib.zcEC161Class();
See my response to "Can I use EC161 in BasicCard .NET Library ?" for more details.

The above code cannot work, since you have to pass a pointer to existing memory as context. This would be like this for native C++:
ZCCRYPTRET ret;
ZCCRYPT_CONTEXT_EC161 context;
ret=ZCCryptEC161CreateContext(&context, 1);

Or like this for .Net C++ (VS 2005):
ZCCRYPTRET ret;
ZCCRYPT_CONTEXT_EC161 context;
pin_ptr pcontext = &context;
ret=ZCCryptEC161CreateContext(pcontext, 1);



Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]