summaryrefslogtreecommitdiff
path: root/network/wlan/WDI/COMMON/RC4.h
diff options
context:
space:
mode:
authorDaiqian Hu <[email protected]>2016-11-21 08:54:24 +0800
committerDaiqian Hu <[email protected]>2016-11-21 08:54:24 +0800
commita95eaad088f61aa55da9d73015cf1ed86e64a67e (patch)
tree15b498a08a4aee4b7f8b1627d39c965b3aa3ba98 /network/wlan/WDI/COMMON/RC4.h
parent1aa0338ec5418345ea0c383e92b4fa19f7c98425 (diff)
Re-submit for WDI sample driver to GitHub
Submit WDI sample driver to GitHub for RS1.
Diffstat (limited to 'network/wlan/WDI/COMMON/RC4.h')
-rw-r--r--network/wlan/WDI/COMMON/RC4.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/network/wlan/WDI/COMMON/RC4.h b/network/wlan/WDI/COMMON/RC4.h
new file mode 100644
index 00000000..9a765e24
--- /dev/null
+++ b/network/wlan/WDI/COMMON/RC4.h
@@ -0,0 +1,49 @@
+#ifndef __INC_RC4_H
+#define __INC_RC4_H
+
+#define CRC32_POLY 0x04c11db7
+
+void
+EncodeWEP(
+ pu1Byte key,
+ s4Byte keysize,
+ pu1Byte plaintext,
+ s4Byte len,
+ pu1Byte out);
+BOOLEAN
+DecodeWEP(
+ pu1Byte key,
+ s4Byte keysize,
+ pu1Byte ciphertext,
+ s4Byte len,
+ pu1Byte out);
+
+u1Byte
+ReverseBit(
+ u1Byte data
+ );
+
+// Isaiah note: previous declaration in libkern.h
+// uint32_t crc32(uint32_t crc, const void *bufp, size_t len);
+
+u1Byte
+ReverseBit(
+ u1Byte data
+ );
+
+
+ULONG
+crc32(
+ pu1Byte buf,
+ u4Byte len);
+
+
+void init_crc32(void);
+typedef struct
+{
+ u4Byte x;
+ u4Byte y;
+ u1Byte state[256];
+}ArcfourContext;
+
+#endif //#ifndef __INC_RC4_H