OT: Cypto Lib

Ed F. McCurdy efmccurdy-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Oct 15 20:37:36 UTC 2009


>>>>> "Rajinder" == Rajinder Yadav <devguy.ca-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> writes:

    >> This project wraps openssl for use from python:
    >> 
    >> http://chandlerproject.org/bin/view/Projects/MeTooCrypto
    >> 
    >> It could be used as guide for how to build a similar interface
    >> for Ruby.

Python and Ruby have similar mechanisms for calling code written in C.
M2Crypto uses SWIG to generate the wrapper code to use openssl.
SWIG can generate wrapper code for Ruby as well as Python.

    >> "M2Crypto's unit tests cover over 80% of the Python code."

    Rajinder> What does that mean, the code is written mostly in python?
    Rajinder> With Ruby I am planning on doing all the heavy lifting in
    Rajinder> C/C++ code and just writing Ruby wrappers.

The Python code being tested is the wrapper code that makes
openssl functions callable from Python, all the
crypto work is done inside libssl.so and libcrypto.so from openssl.org.

    Rajinder> Would know have an idea how M2Crypto is coded, thanks!

It is coded in much the same way as any typical Ruby Extension Module;
a google search for "swig ruby" will turn up many similiar examples.

Ed
-- 

Edward F. McCurdy                | efmccurdy-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org




--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list