3 * Copyright (C) 2006-2015 wolfSSL Inc.
5 * This file is part of wolfSSL. (formerly known as CyaSSL)
7 * wolfSSL is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * wolfSSL is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 #ifndef WOLF_CRYPT_MISC_H
24 #define WOLF_CRYPT_MISC_H
27 #include <wolfssl/wolfcrypt/types.h>
37 word32 rotlFixed(word32, word32);
39 word32 rotrFixed(word32, word32);
42 word32 ByteReverseWord32(word32);
44 void ByteReverseWords(word32*, const word32*, word32);
47 void XorWords(wolfssl_word*, const wolfssl_word*, word32);
49 void xorbuf(void*, const void*, word32);
52 void ForceZero(const void*, word32);
55 int ConstantCompare(const byte*, const byte*, int);
57 #ifdef WORD64_AVAILABLE
59 word64 rotlFixed64(word64, word64);
61 word64 rotrFixed64(word64, word64);
64 word64 ByteReverseWord64(word64);
66 void ByteReverseWords64(word64*, const word64*, word32);
67 #endif /* WORD64_AVAILABLE */
69 #endif /* NO_INLINE */
77 #endif /* WOLF_CRYPT_MISC_H */