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