GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
PassphraseGenerator.h
1 
29 #pragma once
30 
31 #include "core/function/basic/GpgFunctionObject.h"
32 
33 namespace GpgFrontend {
34 
40 class GPGFRONTEND_CORE_EXPORT PassphraseGenerator
41  : public SingletonFunctionObject<PassphraseGenerator> {
42  public:
51 
58  auto Generate(int len) -> QString;
59 
60  private:
61  std::random_device rd_;
62  std::mt19937 mt_ = std::mt19937(rd_());
63 };
64 
65 } // namespace GpgFrontend
The PassphraseGenerator class.
Definition: PassphraseGenerator.h:41
std::random_device rd_
Random device.
Definition: PassphraseGenerator.h:61
PassphraseGenerator(int channel=SingletonFunctionObject::GetDefaultChannel())
PassphraseGenerator constructor.
Definition: PassphraseGenerator.h:48
Definition: GpgFunctionObject.h:58
static auto GetDefaultChannel() -> int
Get the Default Channel object.
Definition: GpgFunctionObject.h:131
Definition: app.cpp:39