Angel Martinez Gonzalez wrote:
Hello:
I want to cypher/decypher an struct:
struct PeticionSeudonimo
{
char *mensaje;
int id_peticion;
DES_cblock *clave_simetrica;
}peticion_seudonimo;
To do this, I first convert this struct to char *:
char *ptrPeticionSeudonimo = (char
Hello:
Thanks Nils for you help, but I obtain the problem. I have tried your
advice:
RSA_public_encrypt(sizeof(texto)+1, texto, textocifrado, claveRSA,
RSA_PKCS1_PADDING);
but the problem is the same.
- Original Message -
From: Nils Larsch [EMAIL PROTECTED]
To:
I'm afraid sizeof(texto) returns the size of the pointer itself (4 in case of
IA-32), not the data length. sizeof(struct PeticionSeudonimo) would be more
effective.
Also, you are using pointers in your struct (like char *mensaje), which means
you are ciphering the pointer only, not the data it
Hello:
I want to cypher/decypher an struct:
struct PeticionSeudonimo
{
char *mensaje;
int id_peticion;
DES_cblock *clave_simetrica;
}peticion_seudonimo;
To do this, I first convert this struct to char *:
char *ptrPeticionSeudonimo = (char *)peticion_seudonimo;
Then I use this