| 24 | #define BLAKE2_IMPL_NAME(fun) BLAKE2_IMPL_EVAL(fun, SUFFIX) |
| 25 | |
| 26 | static inline uint32_t load32( const void *src ) |
| 27 | { |
| 28 | #if defined(NATIVE_LITTLE_ENDIAN) && !defined(HAVE_ALIGNED_ACCESS_REQUIRED) |
| 29 | return *( uint32_t * )( src ); |
| 30 | #else |
| 31 | const uint8_t *p = ( uint8_t * )src; |
| 32 | uint32_t w = *p++; |
| 33 | w |= ( uint32_t )( *p++ ) << 8; |
| 34 | w |= ( uint32_t )( *p++ ) << 16; |
| 35 | w |= ( uint32_t )( *p++ ) << 24; |
| 36 | return w; |
| 37 | #endif |
| 38 | } |
| 39 | |
| 40 | static inline uint64_t load64( const void *src ) |
| 41 | { |
no outgoing calls
no test coverage detected