anotherim-desktop/crypto-vala/src/random.vala

10 lines
163 B
Vala
Raw Normal View History

2021-03-23 14:05:50 +00:00
namespace Crypto {
public static void randomize(uint8[] buffer) {
#if GCRYPT
2021-03-23 14:05:50 +00:00
GCrypt.Random.randomize(buffer);
#else
OpenSSL.RAND.bytes(buffer);
#endif
}
2021-03-23 14:05:50 +00:00
}