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