Search:

Type: Posts; User: homoon

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    3,587

    RSA generate key in C

    Hi all, as I need to generate RSA key by modulus and exponent. I have used the OPENSSL before, is it any other choice to do these operation? (NOT OPENSSL)
  2. Replies
    4
    Views
    961

    very strange case!!

    I have tried to call a static library, and it has a function like this:

    exp=010001
    why the result is even number? It go into the "IF" condition


    int checking(char* exp)
    {
    int x;
    ...
  3. How can I do this kind of operation, I want to...

    How can I do this kind of operation, I want to assign value to the charater pointer
  4. Error occur in free(out);

    Error occur in free(out);
  5. Yes, SIGABRT is occur...

    Yes, SIGABRT is occur...
  6. How to assign char to charater pointer in specify location

    Hi All, I want to ask about how to assign charater to charater pointer in specify location, is it any problem when I do like this?



    char* out = NULL;
    out= malloc(11);


    for(int i=0; i<5;...
  7. Replies
    5
    Views
    1,120

    Thanks qny and Salam, the problem have been...

    Thanks qny and Salam, the problem have been solved.
    I want to ask Salam one more question:

    Why the variable c, I don't need to use malloc to allocate the memory?
  8. Replies
    5
    Views
    1,120

    thanks qny, I have modified the code like this,...

    thanks qny, I have modified the code like this, and the memory leak still occur.



    char* a=NULL;
    char* b=NULL;
    char* c=NULL;

    a=malloc(2);
    b=malloc(2);
  9. Replies
    5
    Views
    1,120

    how to avoid memory leak

    I have created a concate function for pointer:


    char* sc(char* left, char* right)
    {
    int totallen=strlen(left)+strlen(right);
    char* output= malloc(totallen+1);
    strcpy(output,...
  10. Replies
    5
    Views
    41,353

    How to change HEX String to Byte Array

    Hi All, I want to change HEX String to Byte Array, but I can't get the expected result.



    //Hex String
    char* HEXStr="A4505D0B0F6AEDAA";

    unsigned char* tmpByte=malloc(9);
    for(int i=0; i<16;...
  11. Replies
    5
    Views
    2,190

    thx all, you all solved my problem, many thanks!!!

    thx all, you all solved my problem, many thanks!!!
  12. Replies
    5
    Views
    2,190

    when will we use "free" in c

    Hi All, when I use "free" pointer in C, I got Sigabrt.



    char* output=malloc(8*sizeof(char));
    output="abcdefg";
    printf("%s", output);

    free(output); //<----SIGABRT error
  13. Replies
    4
    Views
    18,240

    How to get the length of char array

    Hi All, I want to get the length of char array, but the char array may contain NULL Terminator 0x00, many thanks!!

    For Example:


    char t1[5];
    t1[0]=0x45;
    t1[1]=0x46;
    t1[2]='\0';
    t1[3]=0x47;
  14. warning: Incompatible integer to pointer conversion assigning to 'char *' to int

    Hi all, when I use the function to concat the pointer, the warning message is come out (Incompatible integer to pointer conversion assigning to 'char *' to 'int'), how can I fix this, many thanks!!
    ...
  15. Replies
    4
    Views
    1,762

    I just want do "get" "set" like C#, what can I...

    I just want do "get" "set" like C#, what can I do...
  16. Replies
    4
    Views
    1,762

    How to get value of set value in C

    Hi all,

    As I want to store data where running a function, then I need to use the data again.

    for e.g, when runfunction run only once, it work fine, when it run more than one, the printf will...
  17. Replies
    3
    Views
    1,893

    Oh, I have passed the char arrary to the RSA...

    Oh, I have passed the char arrary to the RSA function, and the return is that:

    out[0]= 41
    out[1]= 79
    ....
    that's mean each of the char array store the oct number; therefore, when I...
  18. Replies
    3
    Views
    1,893

    About char pointer to char array

    Hi All,

    I have used openssl rsa encrypt function, and the result is in
    'unsigned char'. I have tried to display it and check the values, and it also get the expected result.



    for(int i=0;...
  19. Replies
    1
    Views
    1,116

    How to get set char array in c

    Hi All, how to get/set char array in C, many thanks!!
  20. Oh,...yes, there is some mistake, and I have...

    Oh,...yes, there is some mistake, and I have modifed it...
    I want to ask a question, the plain text pass in to the
    DES_ecb3_encrypt function, is it a "hex string"? or I need to change it to ascii...
  21. Here is the key valuekey1, key3=...

    Here is the key valuekey1, key3= 1313232323231313key2 = 6789678967896789===============================
    des_cblock key1,key3,seed = {0x13,0x13,0x23,0x23,0x23,0x23,0x13,0x13}; des_cblock key2 = ...
  22. please help

    please help
  23. Hi, whole code as below, _k1,_k2, _k3 change to...

    Hi, whole code as below, _k1,_k2, _k3 change to key1, key2, key3
    please give me some hints, many thanks!!





    unsigned char out[8];
    const char *temp="0592789FFFEDCBA9";
    des_cblock...
  24. 3DES ECB MODE IN OPENSSL Can't get expected Result

    Hi All,

    I am using the OPENSSL to encrypt the plain text, but the output is wrong, can anyone give me hints or solution, many thanks!!



    unsigned char out[8];
    char...
  25. Replies
    8
    Views
    3,421

    I have used the stupid method....solved the...

    I have used the stupid method....solved the problem
    LOGIC TABLE (HEX)
Results 1 to 25 of 49
Page 1 of 2 1 2