Initial upload of HyprArch releng configuration

This commit is contained in:
2026-03-03 20:31:33 +00:00
commit 7df61351c0
634 changed files with 36355 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
/* === This file is part of Calamares - <https://calamares.io> ===
*
* SPDX-FileCopyrightText: 2019-2020 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
*
*
* Calamares is Free Software: see the License-Identifier above.
*
*
*/
#ifndef UTILS_ENTROPY_H
#define UTILS_ENTROPY_H
#include "DllMacro.h"
#include <QByteArray>
namespace Calamares
{
/// @brief Which entropy source was actually used for the entropy.
enum class EntropySource
{
None, ///< Buffer is empty, no random data
URandom, ///< Read from /dev/urandom
Twister ///< Generated by pseudo-random
};
/** @brief Fill buffer @p b with exactly @p size random bytes
*
* The array is cleared and resized, then filled with 0xcb
* "just in case", after which it is filled with random
* bytes from a suitable source. Returns which source was used.
*/
DLLEXPORT EntropySource getEntropy( int size, QByteArray& b );
/** @brief Fill string @p s with exactly @p size random printable ASCII characters
*
* The characters are picked from a set of 64 (2^6). The string
* contains 6 * size bits of entropy. * Returns which source was used.
* @see getEntropy
*/
DLLEXPORT EntropySource getPrintableEntropy( int size, QString& s );
} // namespace Calamares
#endif