Hello again,

In the case that somebody want to help me with that problem, I attached some files.
import os
import sipconfig

# The name of the SIP build file generated by SIP and used by the build
# system.
build_file = "md5test.sbf"

# Get the SIP configuration information.
config = sipconfig.Configuration()

# Run SIP to generate the code.
os.system(" ".join([config.sip_bin, "-c", ".", "-b", build_file, "md5test.sip"]))

# Create the Makefile.
makefile = sipconfig.SIPModuleMakefile(config, build_file)

# Add the library we are wrapping.  The name doesn't include any platform
# specific prefixes or extensions (e.g. the "lib" prefix on UNIX, or the
# ".dll" extension on Windows).
makefile.extra_libs = ["ssl"]
makefile._build['objects'] += " md5test.o"

# Generate the Makefile itself.
makefile.generate()
#include <openssl/md5.h>
#include "md5test.h"

void md5test::hash()
{
        unsigned char* hash;
        unsigned char* md;
        unsigned char* d;
        unsigned long n = 1;

        d = new unsigned char(1);
        *d = 123;
        hash = new unsigned char(16);
        md = new unsigned char(16);


        hash = MD5(d,n,md);
}

#include <openssl/md5.h>

class md5test {

public:
	void hash();

};
%Module md5test

class md5test
{
%TypeHeaderCode
#include <iostream>
#include <openssl/md5.h>
#include "md5test.h"
%End

public:
    void hash();
};

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to