Move XOR function to af.c, nobody outside of it use it now.
authorMilan Broz <gmazyland@gmail.com>
Thu, 30 Jul 2009 14:59:10 +0000 (14:59 +0000)
committerMilan Broz <gmazyland@gmail.com>
Thu, 30 Jul 2009 14:59:10 +0000 (14:59 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@81 36d66b0a-2a48-0410-832c-cd162a569da5

ChangeLog
luks/Makefile.am
luks/XORblock.h [deleted file]
luks/af.c
luks/keymanage.c

index d3532c2f30a9464483c000a955b5c0d079b976c7..e0c371621fbfa8e031738298dbc71e2df0c0754f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        * Return ENOENT for empty keyslots, EINVAL will be used later for other type of error.
        * Switch PBKDF2 from internal SHA1 to libgcrypt, make hash algorithm not hardcoded to SHA1 here.
        * Add required parameters for changing hash used in LUKS key setup scheme.
+       * Do not export simple XOR helper now used only inside AF functions.
 
 2009-07-28  Milan Broz  <mbroz@redhat.com>
        * Pad luks header to 512 sector size.
index c914769f39267c9022ea9d6d2108030501acca9d..a79b703ad3e04356837cac8121e50657bdfc7e3f 100644 (file)
@@ -16,7 +16,6 @@ libluks_la_SOURCES = \
        sha/hmac.h \
        sha/hmac_sha1.c \
        sha/sha1.h \
-       XORblock.h \
        pbkdf.h \
        random.h \
        af.h \
diff --git a/luks/XORblock.h b/luks/XORblock.h
deleted file mode 100644 (file)
index 6171ae1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef INCLUDED_CRYPTSETUP_LUKS_XORBLOCK_H
-#define INCLUDED_CRYPTSETUP_LUKS_XORBLOCK_H
-
-#include <stddef.h>
-
-static void inline XORblock(char const *src1, char const *src2, char *dst, size_t n)
-{
-       size_t j;
-       for(j = 0; j < n; ++j)
-               dst[j] = src1[j] ^ src2[j];
-}
-
-#endif
index 31a0197fcedb869a4d9d66d77743fe8502d2c538..3b5c180b6a192c813c1a3e1adc4a848d8052d07b 100644 (file)
--- a/luks/af.c
+++ b/luks/af.c
 #include <errno.h>
 #include <gcrypt.h>
 #include "sha1.h"
-#include "XORblock.h"
 #include "random.h"
 
+static void XORblock(char const *src1, char const *src2, char *dst, size_t n)
+{
+       size_t j;
+
+       for(j = 0; j < n; ++j)
+               dst[j] = src1[j] ^ src2[j];
+}
+
 static int hash_buf(char *src, char *dst, uint32_t iv, int len, int hash_id)
 {
        gcry_md_hd_t hd;
index aba9fe2ba8d6de043f83cfc576ec257f7d324dd2..b914573ac6ae5c8e898fadb68a4b9fb956645738 100644 (file)
@@ -35,7 +35,6 @@
 #include "pbkdf.h"
 #include "sha1.h"
 #include "random.h"
-#include "XORblock.h"
 #include <uuid/uuid.h>
 #include <../lib/internal.h>