ed(1): simplify by using arc4random_buf().
Suggested by: ed
This commit is contained in:
parent
20fee1093e
commit
0745a9c965
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300340
@ -90,16 +90,13 @@ void
|
|||||||
init_des_cipher(void)
|
init_des_cipher(void)
|
||||||
{
|
{
|
||||||
#ifdef DES
|
#ifdef DES
|
||||||
int i;
|
|
||||||
|
|
||||||
des_ct = des_n = 0;
|
des_ct = des_n = 0;
|
||||||
|
|
||||||
/* initialize the initialization vector */
|
/* initialize the initialization vector */
|
||||||
MEMZERO(ivec, 8);
|
MEMZERO(ivec, 8);
|
||||||
|
|
||||||
/* initialize the padding vector */
|
/* initialize the padding vector */
|
||||||
for (i = 0; i < 8; i++)
|
arc4random_buf(pvec, sizeof(pvec));
|
||||||
pvec[i] = (char)arc4random_uniform(256);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user