diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-08-17 11:31:45 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-08-19 12:53:04 +0200 |
commit | 00b4663813829ad3391d03383b82eee5d439de70 (patch) | |
tree | 6ba9f2cfaacd3720f23c953de1643104787e0fe8 /src | |
parent | 3c4d5f2ff5ce5f69fb50ff1c5c15ba52c72395f1 (diff) | |
download | systemd-00b4663813829ad3391d03383b82eee5d439de70.tar.gz |
random-seed: use SHA256_DIGEST_SIZE
Diffstat (limited to 'src')
-rw-r--r-- | src/random-seed/random-seed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c index b265b7f85c..dedbdb2667 100644 --- a/src/random-seed/random-seed.c +++ b/src/random-seed/random-seed.c @@ -293,7 +293,7 @@ static int run(int argc, char *argv[]) { * and replace the last 32 bytes of the seed with the hash output, so that the * new seed file can't regress in entropy. */ if (hashed_old_seed) { - uint8_t hash[32]; + uint8_t hash[SHA256_DIGEST_SIZE]; sha256_process_bytes(&k, sizeof(k), &hash_state); /* Hash length to distinguish from old seed. */ sha256_process_bytes(buf, k, &hash_state); sha256_finish_ctx(&hash_state, hash); |