diff --git a/wolfcrypt/src/misc.c b/wolfcrypt/src/misc.c index 2aaec44fb..cfb669f90 100644 --- a/wolfcrypt/src/misc.c +++ b/wolfcrypt/src/misc.c @@ -240,7 +240,7 @@ STATIC INLINE int ConstantCompare(const byte* a, const byte* b, int length) #endif /* !WOLFSSL_HAVE_MAX */ /* converts a 32 bit integer to 24 bit */ -static INLINE void c32to24(word32 in, word24 out) +STATIC INLINE void c32to24(word32 in, word24 out) { out[0] = (in >> 16) & 0xff; out[1] = (in >> 8) & 0xff; @@ -248,14 +248,14 @@ static INLINE void c32to24(word32 in, word24 out) } /* convert 16 bit integer to opaque */ -static INLINE void c16toa(word16 u16, byte* c) +STATIC INLINE void c16toa(word16 u16, byte* c) { c[0] = (u16 >> 8) & 0xff; c[1] = u16 & 0xff; } /* convert 32 bit integer to opaque */ -static INLINE void c32toa(word32 u32, byte* c) +STATIC INLINE void c32toa(word32 u32, byte* c) { c[0] = (u32 >> 24) & 0xff; c[1] = (u32 >> 16) & 0xff; @@ -264,32 +264,32 @@ static INLINE void c32toa(word32 u32, byte* c) } /* convert a 24 bit integer into a 32 bit one */ -static INLINE void c24to32(const word24 u24, word32* u32) +STATIC INLINE void c24to32(const word24 u24, word32* u32) { *u32 = (u24[0] << 16) | (u24[1] << 8) | u24[2]; } /* convert opaque to 24 bit integer */ -static INLINE void ato24(const byte* c, word32* u24) +STATIC INLINE void ato24(const byte* c, word32* u24) { *u24 = (c[0] << 16) | (c[1] << 8) | c[2]; } /* convert opaque to 16 bit integer */ -static INLINE void ato16(const byte* c, word16* u16) +STATIC INLINE void ato16(const byte* c, word16* u16) { *u16 = (word16) ((c[0] << 8) | (c[1])); } /* convert opaque to 32 bit integer */ -static INLINE void ato32(const byte* c, word32* u32) +STATIC INLINE void ato32(const byte* c, word32* u32) { *u32 = (c[0] << 24) | (c[1] << 16) | (c[2] << 8) | c[3]; } -static INLINE word32 btoi(byte b) +STATIC INLINE word32 btoi(byte b) { return (word32)(b - 0x30); } diff --git a/wolfssl/wolfcrypt/misc.h b/wolfssl/wolfcrypt/misc.h index 5f4de41a7..88a43d61f 100644 --- a/wolfssl/wolfcrypt/misc.h +++ b/wolfssl/wolfcrypt/misc.h @@ -87,6 +87,7 @@ void c16toa(word16 u16, byte* c); void c32toa(word32 u32, byte* c); void c24to32(const word24 u24, word32* u32); void ato16(const byte* c, word16* u16); +void ato24(const byte* c, word32* u24); void ato32(const byte* c, word32* u32); word32 btoi(byte b);