2 Questions:
I have been trying to find a tutorial on this and even asked in other forums so far no luck. What I want to do is convert a string to a 64 bit hexadecimal WEP KEY For example:
Text : "santa"
64 bit hex : "DA3011B523"
I also have a form the user will enter data into I want to then have the
form to to a website automatically tell it what part of the site to go
to and then fill in the info and press the save button on the website,
is this possible and if it is how do I do it.
I'm pretty new to C# but would really like to get this going.

Converting a string to a 64 bit WEP KEY
Johan Sörlin
You got me interested, so I tracked down the algorithm, and converted it to C#:
public void Main(string[] args)
{
string str = "santa";
byte[] result = ComputeWep128(str);
Console.WriteLine(BitConverter.ToString(result));
List<byte[]> result2 = ComputeWep40(str);
Console.WriteLine(BitConverter.ToString(result2[0]));
}
byte[] ComputeWep128(string str)
{
byte[] result = ComputeWep156(str);
Array.Resize(ref result, 13);
return result;
}
byte[] ComputeWep156(string str)
{
while (str.Length < 64)
str = str + str;
str = str.Substring(0,64);
byte[] data = System.Text.Encoding.ASCII.GetBytes(str);
MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
return md5.ComputeHash(data);
}
List<byte[]> ComputeWep40(string str)
{
byte[] pseed = new byte[4];
int i = 0;
byte[] data = System.Text.Encoding.ASCII.GetBytes(str);
foreach(byte b in data)
{
pseed[ i ] ^= b;
i = (++i) & 3;
}
int seed = BitConverter.ToInt32(pseed, 0);
List<byte[]> result = new List<byte[]>();
for (i = 0; i < 4; ++i)
{
byte[] wep = new byte[5];
for(int j = 0; j < 5; ++j)
{
seed = (214013 * seed + 0x269ec3) & 0xFFFFFF;
byte keybyte =(byte) (seed >> 16);
wep[j] = keybyte;
}
result.Add(wep);
}
return result;
}
John Papa
Jim Dykstra
Thanks though
hrubesh
BobH
http://www.codeproject.com/csharp/wepkey_generator.asp
UK_2006
http://www.powerdog.com/wepkey.cgi
St&#233;phane Beauchemin
There is no "official" method of converting a string into a WEP key. Each wifi vendor has created their own algorithm to do it. The hex number is the only important/useful one. The string to hex feature is just a convenience they throw in.
So, based on that, there's really no way of determining the algorithm based on one sample of the conversion. With several sets of input/output it may be possible, but it would mostly be just trial & error.