summaryrefslogtreecommitdiff
path: root/nacl/curvecp/uint32_unpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/curvecp/uint32_unpack.c')
-rw-r--r--nacl/curvecp/uint32_unpack.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/nacl/curvecp/uint32_unpack.c b/nacl/curvecp/uint32_unpack.c
new file mode 100644
index 00000000..adde6987
--- /dev/null
+++ b/nacl/curvecp/uint32_unpack.c
@@ -0,0 +1,11 @@
1#include "uint32_unpack.h"
2
3crypto_uint32 uint32_unpack(const unsigned char *x)
4{
5 crypto_uint32 result;
6 result = x[3];
7 result <<= 8; result |= x[2];
8 result <<= 8; result |= x[1];
9 result <<= 8; result |= x[0];
10 return result;
11}