diff options
Diffstat (limited to 'FreeRTOS-Plus/Source/WolfSSL/wolfssl/wolfcrypt/blake2-impl.h')
-rw-r--r-- | FreeRTOS-Plus/Source/WolfSSL/wolfssl/wolfcrypt/blake2-impl.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/FreeRTOS-Plus/Source/WolfSSL/wolfssl/wolfcrypt/blake2-impl.h b/FreeRTOS-Plus/Source/WolfSSL/wolfssl/wolfcrypt/blake2-impl.h index e1882f2a1..cb4df286c 100644 --- a/FreeRTOS-Plus/Source/WolfSSL/wolfssl/wolfcrypt/blake2-impl.h +++ b/FreeRTOS-Plus/Source/WolfSSL/wolfssl/wolfcrypt/blake2-impl.h @@ -12,9 +12,9 @@ */ /* blake2-impl.h * - * Copyright (C) 2006-2015 wolfSSL Inc. + * Copyright (C) 2006-2020 wolfSSL Inc. * - * This file is part of wolfSSL. (formerly known as CyaSSL) + * This file is part of wolfSSL. * * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,16 +28,17 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ + #ifndef WOLFCRYPT_BLAKE2_IMPL_H #define WOLFCRYPT_BLAKE2_IMPL_H #include <wolfssl/wolfcrypt/types.h> -static inline word32 load32( const void *src ) +static WC_INLINE word32 load32( const void *src ) { #if defined(LITTLE_ENDIAN_ORDER) return *( word32 * )( src ); @@ -51,7 +52,7 @@ static inline word32 load32( const void *src ) #endif } -static inline word64 load64( const void *src ) +static WC_INLINE word64 load64( const void *src ) { #if defined(LITTLE_ENDIAN_ORDER) return *( word64 * )( src ); @@ -69,7 +70,7 @@ static inline word64 load64( const void *src ) #endif } -static inline void store32( void *dst, word32 w ) +static WC_INLINE void store32( void *dst, word32 w ) { #if defined(LITTLE_ENDIAN_ORDER) *( word32 * )( dst ) = w; @@ -82,7 +83,7 @@ static inline void store32( void *dst, word32 w ) #endif } -static inline void store64( void *dst, word64 w ) +static WC_INLINE void store64( void *dst, word64 w ) { #if defined(LITTLE_ENDIAN_ORDER) *( word64 * )( dst ) = w; @@ -99,7 +100,7 @@ static inline void store64( void *dst, word64 w ) #endif } -static inline word64 load48( const void *src ) +static WC_INLINE word64 load48( const void *src ) { const byte *p = ( const byte * )src; word64 w = *p++; @@ -111,7 +112,7 @@ static inline word64 load48( const void *src ) return w; } -static inline void store48( void *dst, word64 w ) +static WC_INLINE void store48( void *dst, word64 w ) { byte *p = ( byte * )dst; *p++ = ( byte )w; w >>= 8; @@ -122,28 +123,28 @@ static inline void store48( void *dst, word64 w ) *p++ = ( byte )w; } -static inline word32 rotl32( const word32 w, const unsigned c ) +static WC_INLINE word32 rotl32( const word32 w, const unsigned c ) { return ( w << c ) | ( w >> ( 32 - c ) ); } -static inline word64 rotl64( const word64 w, const unsigned c ) +static WC_INLINE word64 rotl64( const word64 w, const unsigned c ) { return ( w << c ) | ( w >> ( 64 - c ) ); } -static inline word32 rotr32( const word32 w, const unsigned c ) +static WC_INLINE word32 rotr32( const word32 w, const unsigned c ) { return ( w >> c ) | ( w << ( 32 - c ) ); } -static inline word64 rotr64( const word64 w, const unsigned c ) +static WC_INLINE word64 rotr64( const word64 w, const unsigned c ) { return ( w >> c ) | ( w << ( 64 - c ) ); } /* prevents compiler optimizing out memset() */ -static inline void secure_zero_memory( void *v, word64 n ) +static WC_INLINE void secure_zero_memory( void *v, word64 n ) { volatile byte *p = ( volatile byte * )v; |