uint64_unpack.c 366 B

123456789101112131415
  1. #include "uint64_unpack.h"
  2. crypto_uint64 uint64_unpack(const unsigned char *x)
  3. {
  4. crypto_uint64 result;
  5. result = x[7];
  6. result <<= 8; result |= x[6];
  7. result <<= 8; result |= x[5];
  8. result <<= 8; result |= x[4];
  9. result <<= 8; result |= x[3];
  10. result <<= 8; result |= x[2];
  11. result <<= 8; result |= x[1];
  12. result <<= 8; result |= x[0];
  13. return result;
  14. }