stellar-veritas/bundled/cbits/ref10/include/load.h

24 lines
565 B
C
Raw Normal View History

2026-01-25 02:27:22 +01:00
#ifndef CRYPTO_LOAD_H
#define CRYPTO_LOAD_H
static inline crypto_uint64 load_3(const unsigned char *in)
{
crypto_uint64 result;
result = (crypto_uint64) in[0];
result |= ((crypto_uint64) in[1]) << 8;
result |= ((crypto_uint64) in[2]) << 16;
return result;
}
static inline crypto_uint64 load_4(const unsigned char *in)
{
crypto_uint64 result;
result = (crypto_uint64) in[0];
result |= ((crypto_uint64) in[1]) << 8;
result |= ((crypto_uint64) in[2]) << 16;
result |= ((crypto_uint64) in[3]) << 24;
return result;
}
#endif /* CRYPTO_LOAD_H */