mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Use std::array to store hash bytes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
b404f1a546
commit
4c8007e461
@ -59,9 +59,9 @@ QString createRandomPassword()
|
||||
std::mt19937 rng(rand_dev());
|
||||
|
||||
QString passwd;
|
||||
unsigned char unsignedCharArray[numChars];
|
||||
std::array<unsigned char, numChars> unsignedCharArray;
|
||||
|
||||
RAND_bytes(unsignedCharArray, numChars);
|
||||
RAND_bytes(unsignedCharArray.data(), numChars);
|
||||
|
||||
for (auto i = 0; i < numChars; i++) {
|
||||
auto byte = unsignedCharArray[i];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user