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
:
48
explicit
PassphraseGenerator
(
49
int
channel =
SingletonFunctionObject::GetDefaultChannel
())
50
:
SingletonFunctionObject
<
PassphraseGenerator
>(channel) {}
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
GpgFrontend::PassphraseGenerator
The PassphraseGenerator class.
Definition:
PassphraseGenerator.h:41
GpgFrontend::PassphraseGenerator::rd_
std::random_device rd_
Random device.
Definition:
PassphraseGenerator.h:61
GpgFrontend::PassphraseGenerator::PassphraseGenerator
PassphraseGenerator(int channel=SingletonFunctionObject::GetDefaultChannel())
PassphraseGenerator constructor.
Definition:
PassphraseGenerator.h:48
GpgFrontend::SingletonFunctionObject
Definition:
GpgFunctionObject.h:57
GpgFrontend::SingletonFunctionObject::GetDefaultChannel
static auto GetDefaultChannel() -> int
Get the Default Channel object.
Definition:
GpgFunctionObject.h:130
GpgFrontend
Definition:
app.cpp:39
src
core
function
PassphraseGenerator.h
Generated by
1.9.1