Hi ,
I am using cypto++4.2. I could compile crypto++4.2
using gcc.c2.95.3.I was able to create a exe.
I have written a  program to do encryption using
RSAFunction. Since i was getting "Segmentation
fault(core dumped)" i have made this program very
simple,just to create Integer object. but still i am
getting "Segmentation fault(core dumped)". It is not
even printing the 1st line of the main().Pl. can any
one help me in this.
The following is the sample ,simplest pgm i have
written

#include "rsa.h"
#include "integer.h"
#include "string"
using namespace CryptoPP;
using namespace std;
class TestEncryption{

protected:
RSAFunction *rsaFunction;

public:
TestEncryption();
};
TestEncryption::TestEncryption(){
cout<<"constructor ";
}


int main(){
cout<<"entered main ";
TestEncryption *encryptor =new TestEncryption();
string modulus="12";
string exponent="65537";
int expolen=exponent.length();
int len=modulus.length();
char *modvalue=new char[len];
modulus.copy(modvalue,len);
len=exponent.length();
char *expvalue=new char[len];
exponent.copy(expvalue,len);
cout<<"creating integer values ";
Integer *n=new Integer(modvalue);
Integer *e=new Integer(expvalue);
}


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Reply via email to