mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-07 21:53:41 +08:00
sm4_rng_reseed增加:重置输出计数和最近输出时间
This commit is contained in:
@@ -186,6 +186,8 @@ int sm4_rng_reseed(SM4_RNG *rng, const uint8_t *addin, size_t addin_len)
|
|||||||
|
|
||||||
sm4_rng_update(rng, seed);
|
sm4_rng_update(rng, seed);
|
||||||
|
|
||||||
|
rng->reseed_counter = 1;
|
||||||
|
rng->last_reseed_time = time(NULL);
|
||||||
|
|
||||||
gmssl_secure_clear(&df_ctx, sizeof(df_ctx));
|
gmssl_secure_clear(&df_ctx, sizeof(df_ctx));
|
||||||
gmssl_secure_clear(entropy, sizeof(entropy));
|
gmssl_secure_clear(entropy, sizeof(entropy));
|
||||||
|
|||||||
Reference in New Issue
Block a user