0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-20 04:12:15 +02:00

Implement Uuid::random().

This commit is contained in:
Felix Geyer 2010-09-22 00:16:01 +02:00
parent eb6eec616c
commit 9f0c3e5411

View File

@ -19,6 +19,8 @@
#include <QtCore/QHash>
#include "crypto/Random.h"
const int Uuid::LENGTH = 16;
Uuid::Uuid()
@ -34,10 +36,7 @@ Uuid::Uuid(const QByteArray& data)
}
Uuid Uuid::random() {
QByteArray randomAray;
// TODO fill with random data
randomAray.fill(1, 16);
return Uuid(randomAray);
return Uuid(Random::randomArray(16));
}
QString Uuid::toBase64() const