update thd function wepKeyGenerater