I have read something about that in the linuxquestions.org forums for programmers, and i thing maybe WEP uses a different algorithm. I tried with xxd:
$ echo my_wireless | xxd
$ 0000000: 6d79 5f77 6972 656c 6573 730a my_wireless.
which gives exactly hex output, but unfortunately not the expected result (with 64 bit encryption is 6620AF017C, and with 128 bit is 72AA25CD43364D09986BF0B5B9).
Anyway i found a temporary solution - the site http://tv.latinsud.com/wepconv.html
Accidentally i found in the google cache for one german site a link which contains the C code and a Makefile for a program, named lwepgen which does exactly what i wanted.
Here it is: http://dslinux.gits.kiev.ua/tags/ucl...d-ons/lwepgen/
It works just fine, at least for me.
Recently i needed the lwepgen and it seems that this is not working corect anymore - i supose because of the changed openssl libraries during the system updates. The new and best working solution is this litle script based on openwrt wiki
. This can be placed somewhere in $PATH and invoked with parameter the string that need to be converted:
echo -n "$1 (64-bit) : "
echo -n $1 | hexdump -e '5/1 "%02x" "\n"'
echo -n "$1 (128-bit): "
echo -n $1 | hexdump -e '13/1 "%02x" "\n"'