fork download
  1. #include <stdint.h>
  2. #include <stdio.h>
  3.  
  4. unsigned char* to_char_array(uint64_t in, unsigned char* buf)
  5. {
  6. for(int i = 0; i < 8; ++i)
  7. buf[i] = (in >> 8*i) & 0xFFu;
  8. return buf;
  9. }
  10.  
  11. void output(unsigned char* key)
  12. {
  13. printf("Current key: %02X %02X %02X %02X %02X %02X %02X %02X \n",
  14. key[7],key[6],key[5],key[4],key[3],key[2],key[1],key[0]);
  15. }
  16.  
  17. int main()
  18. {
  19. const uint64_t start = 0xFFFFFFFFFFFFFF0Fu;
  20. const uint64_t end = 0xFFFFFFFFFFFFFFFFu;
  21. unsigned char buf[8];
  22. //Handles overflow gracefully
  23. for(uint64_t x = start; x != end + 1; ++x)
  24. output(to_char_array(x, buf));
  25. }
Success #stdin #stdout 0s 2248KB
stdin
Standard input is empty
stdout
Current key: FF FF FF FF FF FF FF 0F 
Current key: FF FF FF FF FF FF FF 10 
Current key: FF FF FF FF FF FF FF 11 
Current key: FF FF FF FF FF FF FF 12 
Current key: FF FF FF FF FF FF FF 13 
Current key: FF FF FF FF FF FF FF 14 
Current key: FF FF FF FF FF FF FF 15 
Current key: FF FF FF FF FF FF FF 16 
Current key: FF FF FF FF FF FF FF 17 
Current key: FF FF FF FF FF FF FF 18 
Current key: FF FF FF FF FF FF FF 19 
Current key: FF FF FF FF FF FF FF 1A 
Current key: FF FF FF FF FF FF FF 1B 
Current key: FF FF FF FF FF FF FF 1C 
Current key: FF FF FF FF FF FF FF 1D 
Current key: FF FF FF FF FF FF FF 1E 
Current key: FF FF FF FF FF FF FF 1F 
Current key: FF FF FF FF FF FF FF 20 
Current key: FF FF FF FF FF FF FF 21 
Current key: FF FF FF FF FF FF FF 22 
Current key: FF FF FF FF FF FF FF 23 
Current key: FF FF FF FF FF FF FF 24 
Current key: FF FF FF FF FF FF FF 25 
Current key: FF FF FF FF FF FF FF 26 
Current key: FF FF FF FF FF FF FF 27 
Current key: FF FF FF FF FF FF FF 28 
Current key: FF FF FF FF FF FF FF 29 
Current key: FF FF FF FF FF FF FF 2A 
Current key: FF FF FF FF FF FF FF 2B 
Current key: FF FF FF FF FF FF FF 2C 
Current key: FF FF FF FF FF FF FF 2D 
Current key: FF FF FF FF FF FF FF 2E 
Current key: FF FF FF FF FF FF FF 2F 
Current key: FF FF FF FF FF FF FF 30 
Current key: FF FF FF FF FF FF FF 31 
Current key: FF FF FF FF FF FF FF 32 
Current key: FF FF FF FF FF FF FF 33 
Current key: FF FF FF FF FF FF FF 34 
Current key: FF FF FF FF FF FF FF 35 
Current key: FF FF FF FF FF FF FF 36 
Current key: FF FF FF FF FF FF FF 37 
Current key: FF FF FF FF FF FF FF 38 
Current key: FF FF FF FF FF FF FF 39 
Current key: FF FF FF FF FF FF FF 3A 
Current key: FF FF FF FF FF FF FF 3B 
Current key: FF FF FF FF FF FF FF 3C 
Current key: FF FF FF FF FF FF FF 3D 
Current key: FF FF FF FF FF FF FF 3E 
Current key: FF FF FF FF FF FF FF 3F 
Current key: FF FF FF FF FF FF FF 40 
Current key: FF FF FF FF FF FF FF 41 
Current key: FF FF FF FF FF FF FF 42 
Current key: FF FF FF FF FF FF FF 43 
Current key: FF FF FF FF FF FF FF 44 
Current key: FF FF FF FF FF FF FF 45 
Current key: FF FF FF FF FF FF FF 46 
Current key: FF FF FF FF FF FF FF 47 
Current key: FF FF FF FF FF FF FF 48 
Current key: FF FF FF FF FF FF FF 49 
Current key: FF FF FF FF FF FF FF 4A 
Current key: FF FF FF FF FF FF FF 4B 
Current key: FF FF FF FF FF FF FF 4C 
Current key: FF FF FF FF FF FF FF 4D 
Current key: FF FF FF FF FF FF FF 4E 
Current key: FF FF FF FF FF FF FF 4F 
Current key: FF FF FF FF FF FF FF 50 
Current key: FF FF FF FF FF FF FF 51 
Current key: FF FF FF FF FF FF FF 52 
Current key: FF FF FF FF FF FF FF 53 
Current key: FF FF FF FF FF FF FF 54 
Current key: FF FF FF FF FF FF FF 55 
Current key: FF FF FF FF FF FF FF 56 
Current key: FF FF FF FF FF FF FF 57 
Current key: FF FF FF FF FF FF FF 58 
Current key: FF FF FF FF FF FF FF 59 
Current key: FF FF FF FF FF FF FF 5A 
Current key: FF FF FF FF FF FF FF 5B 
Current key: FF FF FF FF FF FF FF 5C 
Current key: FF FF FF FF FF FF FF 5D 
Current key: FF FF FF FF FF FF FF 5E 
Current key: FF FF FF FF FF FF FF 5F 
Current key: FF FF FF FF FF FF FF 60 
Current key: FF FF FF FF FF FF FF 61 
Current key: FF FF FF FF FF FF FF 62 
Current key: FF FF FF FF FF FF FF 63 
Current key: FF FF FF FF FF FF FF 64 
Current key: FF FF FF FF FF FF FF 65 
Current key: FF FF FF FF FF FF FF 66 
Current key: FF FF FF FF FF FF FF 67 
Current key: FF FF FF FF FF FF FF 68 
Current key: FF FF FF FF FF FF FF 69 
Current key: FF FF FF FF FF FF FF 6A 
Current key: FF FF FF FF FF FF FF 6B 
Current key: FF FF FF FF FF FF FF 6C 
Current key: FF FF FF FF FF FF FF 6D 
Current key: FF FF FF FF FF FF FF 6E 
Current key: FF FF FF FF FF FF FF 6F 
Current key: FF FF FF FF FF FF FF 70 
Current key: FF FF FF FF FF FF FF 71 
Current key: FF FF FF FF FF FF FF 72 
Current key: FF FF FF FF FF FF FF 73 
Current key: FF FF FF FF FF FF FF 74 
Current key: FF FF FF FF FF FF FF 75 
Current key: FF FF FF FF FF FF FF 76 
Current key: FF FF FF FF FF FF FF 77 
Current key: FF FF FF FF FF FF FF 78 
Current key: FF FF FF FF FF FF FF 79 
Current key: FF FF FF FF FF FF FF 7A 
Current key: FF FF FF FF FF FF FF 7B 
Current key: FF FF FF FF FF FF FF 7C 
Current key: FF FF FF FF FF FF FF 7D 
Current key: FF FF FF FF FF FF FF 7E 
Current key: FF FF FF FF FF FF FF 7F 
Current key: FF FF FF FF FF FF FF 80 
Current key: FF FF FF FF FF FF FF 81 
Current key: FF FF FF FF FF FF FF 82 
Current key: FF FF FF FF FF FF FF 83 
Current key: FF FF FF FF FF FF FF 84 
Current key: FF FF FF FF FF FF FF 85 
Current key: FF FF FF FF FF FF FF 86 
Current key: FF FF FF FF FF FF FF 87 
Current key: FF FF FF FF FF FF FF 88 
Current key: FF FF FF FF FF FF FF 89 
Current key: FF FF FF FF FF FF FF 8A 
Current key: FF FF FF FF FF FF FF 8B 
Current key: FF FF FF FF FF FF FF 8C 
Current key: FF FF FF FF FF FF FF 8D 
Current key: FF FF FF FF FF FF FF 8E 
Current key: FF FF FF FF FF FF FF 8F 
Current key: FF FF FF FF FF FF FF 90 
Current key: FF FF FF FF FF FF FF 91 
Current key: FF FF FF FF FF FF FF 92 
Current key: FF FF FF FF FF FF FF 93 
Current key: FF FF FF FF FF FF FF 94 
Current key: FF FF FF FF FF FF FF 95 
Current key: FF FF FF FF FF FF FF 96 
Current key: FF FF FF FF FF FF FF 97 
Current key: FF FF FF FF FF FF FF 98 
Current key: FF FF FF FF FF FF FF 99 
Current key: FF FF FF FF FF FF FF 9A 
Current key: FF FF FF FF FF FF FF 9B 
Current key: FF FF FF FF FF FF FF 9C 
Current key: FF FF FF FF FF FF FF 9D 
Current key: FF FF FF FF FF FF FF 9E 
Current key: FF FF FF FF FF FF FF 9F 
Current key: FF FF FF FF FF FF FF A0 
Current key: FF FF FF FF FF FF FF A1 
Current key: FF FF FF FF FF FF FF A2 
Current key: FF FF FF FF FF FF FF A3 
Current key: FF FF FF FF FF FF FF A4 
Current key: FF FF FF FF FF FF FF A5 
Current key: FF FF FF FF FF FF FF A6 
Current key: FF FF FF FF FF FF FF A7 
Current key: FF FF FF FF FF FF FF A8 
Current key: FF FF FF FF FF FF FF A9 
Current key: FF FF FF FF FF FF FF AA 
Current key: FF FF FF FF FF FF FF AB 
Current key: FF FF FF FF FF FF FF AC 
Current key: FF FF FF FF FF FF FF AD 
Current key: FF FF FF FF FF FF FF AE 
Current key: FF FF FF FF FF FF FF AF 
Current key: FF FF FF FF FF FF FF B0 
Current key: FF FF FF FF FF FF FF B1 
Current key: FF FF FF FF FF FF FF B2 
Current key: FF FF FF FF FF FF FF B3 
Current key: FF FF FF FF FF FF FF B4 
Current key: FF FF FF FF FF FF FF B5 
Current key: FF FF FF FF FF FF FF B6 
Current key: FF FF FF FF FF FF FF B7 
Current key: FF FF FF FF FF FF FF B8 
Current key: FF FF FF FF FF FF FF B9 
Current key: FF FF FF FF FF FF FF BA 
Current key: FF FF FF FF FF FF FF BB 
Current key: FF FF FF FF FF FF FF BC 
Current key: FF FF FF FF FF FF FF BD 
Current key: FF FF FF FF FF FF FF BE 
Current key: FF FF FF FF FF FF FF BF 
Current key: FF FF FF FF FF FF FF C0 
Current key: FF FF FF FF FF FF FF C1 
Current key: FF FF FF FF FF FF FF C2 
Current key: FF FF FF FF FF FF FF C3 
Current key: FF FF FF FF FF FF FF C4 
Current key: FF FF FF FF FF FF FF C5 
Current key: FF FF FF FF FF FF FF C6 
Current key: FF FF FF FF FF FF FF C7 
Current key: FF FF FF FF FF FF FF C8 
Current key: FF FF FF FF FF FF FF C9 
Current key: FF FF FF FF FF FF FF CA 
Current key: FF FF FF FF FF FF FF CB 
Current key: FF FF FF FF FF FF FF CC 
Current key: FF FF FF FF FF FF FF CD 
Current key: FF FF FF FF FF FF FF CE 
Current key: FF FF FF FF FF FF FF CF 
Current key: FF FF FF FF FF FF FF D0 
Current key: FF FF FF FF FF FF FF D1 
Current key: FF FF FF FF FF FF FF D2 
Current key: FF FF FF FF FF FF FF D3 
Current key: FF FF FF FF FF FF FF D4 
Current key: FF FF FF FF FF FF FF D5 
Current key: FF FF FF FF FF FF FF D6 
Current key: FF FF FF FF FF FF FF D7 
Current key: FF FF FF FF FF FF FF D8 
Current key: FF FF FF FF FF FF FF D9 
Current key: FF FF FF FF FF FF FF DA 
Current key: FF FF FF FF FF FF FF DB 
Current key: FF FF FF FF FF FF FF DC 
Current key: FF FF FF FF FF FF FF DD 
Current key: FF FF FF FF FF FF FF DE 
Current key: FF FF FF FF FF FF FF DF 
Current key: FF FF FF FF FF FF FF E0 
Current key: FF FF FF FF FF FF FF E1 
Current key: FF FF FF FF FF FF FF E2 
Current key: FF FF FF FF FF FF FF E3 
Current key: FF FF FF FF FF FF FF E4 
Current key: FF FF FF FF FF FF FF E5 
Current key: FF FF FF FF FF FF FF E6 
Current key: FF FF FF FF FF FF FF E7 
Current key: FF FF FF FF FF FF FF E8 
Current key: FF FF FF FF FF FF FF E9 
Current key: FF FF FF FF FF FF FF EA 
Current key: FF FF FF FF FF FF FF EB 
Current key: FF FF FF FF FF FF FF EC 
Current key: FF FF FF FF FF FF FF ED 
Current key: FF FF FF FF FF FF FF EE 
Current key: FF FF FF FF FF FF FF EF 
Current key: FF FF FF FF FF FF FF F0 
Current key: FF FF FF FF FF FF FF F1 
Current key: FF FF FF FF FF FF FF F2 
Current key: FF FF FF FF FF FF FF F3 
Current key: FF FF FF FF FF FF FF F4 
Current key: FF FF FF FF FF FF FF F5 
Current key: FF FF FF FF FF FF FF F6 
Current key: FF FF FF FF FF FF FF F7 
Current key: FF FF FF FF FF FF FF F8 
Current key: FF FF FF FF FF FF FF F9 
Current key: FF FF FF FF FF FF FF FA 
Current key: FF FF FF FF FF FF FF FB 
Current key: FF FF FF FF FF FF FF FC 
Current key: FF FF FF FF FF FF FF FD 
Current key: FF FF FF FF FF FF FF FE 
Current key: FF FF FF FF FF FF FF FF