Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. #define KEYSIZE 16
  5.  
  6. void main()
  7. {
  8. int i,t;
  9. char key[KEYSIZE];
  10.  
  11. int first_timestamp = 1524013729;
  12. int last_timestamp = 1524020929;
  13.  
  14.  
  15. // For loop for all seed values i.e. all timestamps
  16. for (t = first_timestamp; t< last_timestamp+1; t++)
  17. {
  18.  
  19. srand (t); // initialises PRNG
  20. for (i = 0; i< KEYSIZE; i++)
  21. {
  22. key[i] = rand()%256;
  23. printf("%.2x", (unsigned char)key[i]);
  24. }
  25.  
  26. printf("\n");
  27. }
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement