VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumeCreationProgressWizardPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main/Forms/VolumeCreationProgressWizardPage.cpp')
-rw-r--r--src/Main/Forms/VolumeCreationProgressWizardPage.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Main/Forms/VolumeCreationProgressWizardPage.cpp b/src/Main/Forms/VolumeCreationProgressWizardPage.cpp
index a1964958..08986f5e 100644
--- a/src/Main/Forms/VolumeCreationProgressWizardPage.cpp
+++ b/src/Main/Forms/VolumeCreationProgressWizardPage.cpp
@@ -21,7 +21,8 @@ namespace VeraCrypt
PreviousGaugeValue (0),
ProgressBarRange (1),
RealProgressBarRange (1),
- VolumeCreatorRunning (false)
+ VolumeCreatorRunning (false),
+ MouseEventsCounter (0)
{
DisplayKeysCheckBox->SetValue (displayKeyInfo);
#ifdef TC_WINDOWS
@@ -35,6 +36,8 @@ namespace VeraCrypt
ProgressGauge->SetMinSize (wxSize (-1, Gui->GetCharHeight (this) * 2));
#endif
+ CollectedEntropy->SetRange (RNG_POOL_SIZE * 8);
+
if (DisplayKeysCheckBox->IsChecked())
ShowBytes (RandomPoolSampleStaticText, RandomNumberGenerator::PeekPool(), true);
else
@@ -184,4 +187,11 @@ namespace VeraCrypt
RealProgressBarRange = ProgressGauge->GetSize().GetWidth();
ProgressGauge->SetRange (RealProgressBarRange);
}
+
+ void VolumeCreationProgressWizardPage::IncrementEntropyProgress ()
+ {
+ ScopeLock lock (AccessMutex);
+ if (MouseEventsCounter < (RNG_POOL_SIZE * 8))
+ CollectedEntropy->SetValue (++MouseEventsCounter);
+ }
}