summaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-24 16:04:43 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-24 16:04:43 +0200
commitda01822671b3a553fd805315df7322b8225cfe95 (patch)
treee97c833cfb81eea5cae93a023cbb52cd84cac6c9 /lib/crypto
parent2413a7200623855b93946d44bcdb949e2dc170a0 (diff)
downloadsamba-da01822671b3a553fd805315df7322b8225cfe95.tar.gz
samba-da01822671b3a553fd805315df7322b8225cfe95.tar.bz2
samba-da01822671b3a553fd805315df7322b8225cfe95.zip
Use common arcfour implementation.
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/arcfour.c2
-rw-r--r--lib/crypto/arcfour.h15
-rw-r--r--lib/crypto/crypto.h11
3 files changed, 17 insertions, 11 deletions
diff --git a/lib/crypto/arcfour.c b/lib/crypto/arcfour.c
index 94196fa1ee..c57e05d0e9 100644
--- a/lib/crypto/arcfour.c
+++ b/lib/crypto/arcfour.c
@@ -20,7 +20,7 @@
*/
#include "includes.h"
-#include "lib/crypto/crypto.h"
+#include "../lib/crypto/arcfour.h"
/* initialise the arcfour sbox with key */
_PUBLIC_ void arcfour_init(struct arcfour_state *state, const DATA_BLOB *key)
diff --git a/lib/crypto/arcfour.h b/lib/crypto/arcfour.h
new file mode 100644
index 0000000000..501b3f2fab
--- /dev/null
+++ b/lib/crypto/arcfour.h
@@ -0,0 +1,15 @@
+#ifndef ARCFOUR_HEADER_H
+#define ARCFOUR_HEADER_H
+
+struct arcfour_state {
+ uint8_t sbox[256];
+ uint8_t index_i;
+ uint8_t index_j;
+};
+
+void arcfour_init(struct arcfour_state *state, const DATA_BLOB *key);
+void arcfour_crypt_sbox(struct arcfour_state *state, uint8_t *data, int len);
+void arcfour_crypt_blob(uint8_t *data, int len, const DATA_BLOB *key);
+void arcfour_crypt(uint8_t *data, const uint8_t keystr[16], int len);
+
+#endif /* ARCFOUR_HEADER_H */
diff --git a/lib/crypto/crypto.h b/lib/crypto/crypto.h
index 9cb16ad344..0a43cbe7d4 100644
--- a/lib/crypto/crypto.h
+++ b/lib/crypto/crypto.h
@@ -23,15 +23,6 @@
#include "../lib/crypto/hmacmd5.h"
#include "../lib/crypto/sha256.h"
#include "../lib/crypto/hmacsha256.h"
+#include "../lib/crypto/arcfour.h"
-struct arcfour_state {
- uint8_t sbox[256];
- uint8_t index_i;
- uint8_t index_j;
-};
-
-void arcfour_init(struct arcfour_state *state, const DATA_BLOB *key);
-void arcfour_crypt_sbox(struct arcfour_state *state, uint8_t *data, int len);
-void arcfour_crypt_blob(uint8_t *data, int len, const DATA_BLOB *key);
-void arcfour_crypt(uint8_t *data, const uint8_t keystr[16], int len);