summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devsdp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-09-11 01:54:06 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-09-11 01:54:06 +0200
commita12180612649d5aebb2ca7e6c7727c41becb4549 (patch)
treea7fcce88036b9c82227f367f6b59877b18a08c20 /sys/src/9/port/devsdp.c
parentb137763fe7ac6f16b18518f8acabb805183401c0 (diff)
kernel: replace various custom random iv buffer filling functions with calls to prng()
Diffstat (limited to 'sys/src/9/port/devsdp.c')
-rw-r--r--sys/src/9/port/devsdp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/src/9/port/devsdp.c b/sys/src/9/port/devsdp.c
index 6443212e4..a840bc635 100644
--- a/sys/src/9/port/devsdp.c
+++ b/sys/src/9/port/devsdp.c
@@ -1998,7 +1998,6 @@ descipherinit(Conv *c)
{
uchar key[8];
uchar ivec[8];
- int i;
int n = c->cipher->keylen;
cipherfree(c);
@@ -2019,8 +2018,7 @@ descipherinit(Conv *c)
/* out */
memset(key, 0, sizeof(key));
setkey(key, n, &c->out, "cipher");
- for(i=0; i<8; i++)
- ivec[i] = nrand(256);
+ prng(ivec, 8);
c->out.cipherblklen = 8;
c->out.cipherivlen = 8;
c->out.cipher = desencrypt;