24 lines
565 B
C
24 lines
565 B
C
|
|
#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 */
|