Помогите с переводом, данного кода
Код:
void encshare1(unsigned int *tbuff, unsigned char *datap, int len);
void encshare4(unsigned char *src, int size, unsigned int *dest);
unsigned char *enctype2_decoder(unsigned char *key, unsigned char *data, int *size) {
unsigned int dest[326];
int i;
unsigned char *datap;
*data ^= 0xec;
datap = data + 1;
for(i = 0; key[i]; i++) datap[i] ^= key[i];
for(i = 256; i < 326; i++) dest[i] = 0;
encshare4(datap, *data, dest);
datap += *data;
*size -= (*data + 1);
if(*size < 6) {
*size = 0;
return(data);
}
encshare1(dest, datap, *size);
*size -= 6;
return(datap);
}
int enctype2_wrapper(unsigned char *key, unsigned char *data, int size) {
unsigned char *p;
p = enctype2_decoder(key, data, &size);
memmove(data, p, size);
return(size);
}
Код:
void encshare1(unsigned int *tbuff, unsigned char *datap, int len);
void encshare4(unsigned char *src, int size, unsigned int *dest);
unsigned char *enctype2_decoder(unsigned char *key, unsigned char *data, int *size) {
unsigned int dest[326];
int i;
unsigned char *datap;
*data ^= 0xec;
datap = data + 1;
for(i = 0; key[i]; i++) datap[i] ^= key[i];
for(i = 256; i < 326; i++) dest[i] = 0;
encshare4(datap, *data, dest);
datap += *data;
*size -= (*data + 1);
if(*size < 6) {
*size = 0;
return(data);
}
encshare1(dest, datap, *size);
*size -= 6;
return(datap);
}
int enctype2_wrapper(unsigned char *key, unsigned char *data, int size) {
unsigned char *p;
p = enctype2_decoder(key, data, &size);
memmove(data, p, size);
return(size);
}