Heikki Toivonen wrote:
Steve Parkinson wrote:
3) NSS is a fairly object-oriented API. But, it lacks a formal
definition of the objects, and how they interrelate. As such, it
is not possible to get swig to automate the creation of language
specific classes.
For example, many of the CERT_* calls just scream out to be attached
to an object.
I would suggest what M2Crypto does (which is a Python wrapper for
OpenSSL): SWIG the NSS functions so that they are available in Python as
functions. Then, create the classes etc. Python niceties in Python.
For example, see the simple ASN1_UTCTIME class in M2Crypto:
http://lxr.osafoundation.org/m2crypto/source/M2Crypto/ASN1.py#076
I like the way the .NET API is consistent, and whether you use C#,
Managed C++, or Visual basic, the API is always the same.
If we leave the OO implementation up to the scripting language wrapper,
then we will potentially have a different API for each language.
I know I'm kind of arguing against my first post on this topic - I'm
still undecided.
Steve
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto