apr_crypto: follow up to r1833359: save a memset().
We can avoid zeroing the key before overwriting it since we have plenty of
zeros available in cprng->buf already.
@@ -158,8 +158,7 @@ apr_status_t cprng_stream_ctx_bytes(cprng_stream_ctx_t **pctx,
cprng_stream_setkey(ctx, key, z);
EVP_CIPHER_CTX_set_padding(ctx, 0);
if (rekey) {
- memset(key, 0, CPRNG_KEY_SIZE);
- EVP_EncryptUpdate(ctx, key, &len, key, CPRNG_KEY_SIZE);
+ EVP_EncryptUpdate(ctx, key, &len, z, CPRNG_KEY_SIZE);
}
if (n) {
EVP_EncryptUpdate(ctx, to, &len, z, n);
