Generate WEP Hex Key From Plaintext
Join the DZone community and get the full member experience.Join For Free
# pad the plaintext to 64 characters, then get an MD5 digest # 128 bits, duh. require 'digest/md5' def pad(text) v = text * (1 + (64 / text.length)) v[0,64] end def wep_key(text) Digest::MD5.hexdigest(pad(text)) end
Opinions expressed by DZone contributors are their own.