This function takes str and converts it into a DES key. I would recommend using MD5 instead and use the first 8 bytes of output.When I wrote the first version of these routines back in 1990, MD5 did not exist but I feel these routines are still sound. This
routines is compatible with the one in MIT's libdes.
void des_random_seed( des_cblock key);
复制代码
This routine sets a starting point for des_random_key().
void des_random_key( des_cblock ret); This function return a random key.
复制代码
Make sure to 'seed' the random number generator (with des_random_seed()) before using this function. I personally now use a MD5 based random number system.作者: suavelee 时间: 2010-07-26 08:55
提示: 作者被禁止或删除 内容自动屏蔽作者: huxk 时间: 2010-07-26 09:26
有人吗?呼叫 ....................作者: bittertea 时间: 2010-07-26 12:36
1。自己生成密钥,然后调用des_set_key_unchecked