Merge branch 'gnutls' of github.com:fmorgner/umurmur into gnutls
[umurmur.git] / src / crypt.c
index eb6b07b2aa68dfd3b50a1b66c6a14271e9794a2c..6eb87b41260511adfbabe77ab9fa1f8fbb3f7be5 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright (C) 2009-2012, Martin Johansson <martin@fatbob.nu>
-   Copyright (C) 2005-2012, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2014, Martin Johansson <martin@fatbob.nu>
+   Copyright (C) 2005-2014, Thorvald Natvig <thorvald@natvig.com>
 
    All rights reserved.
 
@@ -199,7 +199,7 @@ bool_t CryptState_decrypt(cryptState_t *cs, const unsigned char *source, unsigne
        CryptState_ocb_decrypt(cs, source+4, dst, plain_length, cs->decrypt_iv, tag);
 
        if (memcmp(tag, source+1, 3) != 0) {
-               memcpy(cs->decrypt_iv, saveiv, AES_BLOCK_SIZE);         
+               memcpy(cs->decrypt_iv, saveiv, AES_BLOCK_SIZE);
                return false;
        }
        cs->decrypt_history[cs->decrypt_iv[0]] = cs->decrypt_iv[1];
@@ -220,7 +220,7 @@ bool_t CryptState_decrypt(cryptState_t *cs, const unsigned char *source, unsigne
 #define SHIFTBITS 63
 typedef uint64_t subblock;
 
-#if __BYTE_ORDER == __BIG_ENDIAN
+#if CRYPT_BE
 #define SWAPPED(x) (x)
 #else
 #ifdef __x86_64__