Search:

Type: Posts; User: pkumarn

Search: Search took 0.01 seconds; generated 32 minute(s) ago.

  1. Replies
    8
    Views
    5,075

    When we include var.h, compiler would replace...

    When we include var.h, compiler would replace with "int a" in each file and as the scope is not static, wouldn't compiler crib when linking as it finds multiple reference to "int a"?

    I modify the...
  2. Replies
    8
    Views
    5,075

    Variable access across multiple files

    I was trying out programs based on extern and as i understand, this is helpful when accessing variables across multiple files having only one definition.
    But i tried a simple program as below...
  3. Replies
    8
    Views
    1,234

    Thanks folks. Things are clear now.

    Thanks folks. Things are clear now.
  4. Replies
    8
    Views
    1,234

    To dig a bit more. As you said memory is not...

    To dig a bit more. As you said memory is not allocated for int, then how accessing "vinit" in printf() prints 10. At first glance, vinit should be address and not value 10. Maybe i am missing...
  5. Replies
    8
    Views
    1,234

    Thanks for the quick reply. If this is the case...

    Thanks for the quick reply. If this is the case then we could do the following,



    int vinit = 10


    Why do we need such code? I see such code being used by many folks in many places.
  6. Replies
    8
    Views
    1,234

    Assigning value during pointer declaration

    Hi,

    I am trying to understand the behavior of following code. Basically how does printf() prints the value rather than address.
    Does initializing value to a pointer during declaration makes a...
  7. Replies
    3
    Views
    1,506

    Thanks for the quick reply. To dig more into...

    Thanks for the quick reply.

    To dig more into it. I understand the part of pic_data->rq[index] typecasts to u32 gives me value of both 'flag' and 'status' but what would this fetch...
  8. Replies
    3
    Views
    1,506

    Accessing arrays using pointers

    I came across the below code snippet in a project and was not sure how value of variable "response" is computed. Here as we can see, pic_data holds two one dimensional arrays but "response" access...
  9. Replies
    3
    Views
    6,310

    Data type for 32 bit and 64 bit architecture

    Hi,

    I am using u64 (unsigned long long int) to store the following number
    val = (u64) 0x5152535455565758; - When i do print using %llu, it only print 5455565758. Few questions:

    1. The reason...
  10. I wrote a sample program as below by using array...

    I wrote a sample program as below by using array salt_value directly without going through the file stuff and i am getting wrong result.

    ...
  11. Thanks for the reply. So when i do strlen(salt) i...

    Thanks for the reply. So when i do strlen(salt) i get result of 32 which is correct. Now my concern is i need to pass this salt to below fucntion in openssl PKCS5_PBKDF2_HMAC_SHA1(const char *pass,...
  12. Need clarification on reading data from fgets()/fgetc()

    Hi,

    Currently i have a program which use openssl libraries to generate random number using the API

    unsigned char salt[32];
    RAND_bytes(salt, 32).

    Below are my printf's
    printf("%c",...
  13. i think i am getting it... will try and get back...

    i think i am getting it... will try and get back to the forum.. thanks a lot oogabooga and also to other users who have replied...
  14. May be i am confusing things... just to make it...

    May be i am confusing things... just to make it in simple words. How do i pass my DEK[64] to AES_wrap_key() as first parameter...
  15. As per my openssl code base, AES_MAXNR is...

    As per my openssl code base, AES_MAXNR is #define AES_MAXNR 14. So based on this math, i get 408 bits.

    From your code i see you are just copying to array but i am looking at how to assign Int i =...
  16. When i do math on the AES structure, i see it can...

    When i do math on the AES structure, i see it can support upto 480bits (correct me if i am wrong)
    unsigned long rd_key[4 *(AES_MAXNR + 1)];

    Considering AES supports only 256 bits, how do i...
  17. sorry for confusing between bits and bytes... i...

    sorry for confusing between bits and bytes... i got that :) ...

    AES_wrap_key() is the correct function ... if i want this into an array, then how do i assign this to AES_KEY *key.


    struct...
  18. Thanks ledow for the answer. Here is my DEK key...

    Thanks ledow for the answer. Here is my DEK key which is 64 bytes(512 bit) which i want to pass to AES_Key_wrap() function.
    DEK = 016211c7f60824a8ec5df54737a08ad0a11b2e451160601a94ccd53555a335
    ...
  19. How to convert char array of 64 bytes to long long int

    I am using openssl API for encryption in my project. Currently i have a char key[64] =' some hex value' which i need to convert to long long int so that i can pass it to AES_key_wrap() function in...
Results 1 to 19 of 19