Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Geyer <debfx@fobos.de>2010-09-22 02:16:01 +0400
committerFelix Geyer <debfx@fobos.de>2010-09-22 02:16:01 +0400
commit9f0c3e5411709f9f18fd176a5ca2738b6fde0c9a (patch)
treed98640bec4045fcac239172ba5b03ffc54ea6099 /src
parenteb6eec616c45707099b41e777467d4d11b041d9b (diff)
Implement Uuid::random().
Diffstat (limited to 'src')
-rw-r--r--src/core/Uuid.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/Uuid.cpp b/src/core/Uuid.cpp
index fd236df2f..1c7649747 100644
--- a/src/core/Uuid.cpp
+++ b/src/core/Uuid.cpp
@@ -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