mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-18 04:04:29 -05:00
Implement Uuid::random().
This commit is contained in:
parent
eb6eec616c
commit
9f0c3e5411
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#include <QtCore/QHash>
|
#include <QtCore/QHash>
|
||||||
|
|
||||||
|
#include "crypto/Random.h"
|
||||||
|
|
||||||
const int Uuid::LENGTH = 16;
|
const int Uuid::LENGTH = 16;
|
||||||
|
|
||||||
Uuid::Uuid()
|
Uuid::Uuid()
|
||||||
@ -34,10 +36,7 @@ Uuid::Uuid(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Uuid Uuid::random() {
|
Uuid Uuid::random() {
|
||||||
QByteArray randomAray;
|
return Uuid(Random::randomArray(16));
|
||||||
// TODO fill with random data
|
|
||||||
randomAray.fill(1, 16);
|
|
||||||
return Uuid(randomAray);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Uuid::toBase64() const
|
QString Uuid::toBase64() const
|
||||||
|
Loading…
Reference in New Issue
Block a user