diff options
Diffstat (limited to 'src/Main/Forms/VolumeCreationProgressWizardPage.cpp')
-rw-r--r-- | src/Main/Forms/VolumeCreationProgressWizardPage.cpp | 12 |
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 @@ -20,9 +20,10 @@ namespace VeraCrypt : VolumeCreationProgressWizardPageBase (parent), PreviousGaugeValue (0), ProgressBarRange (1), RealProgressBarRange (1), - VolumeCreatorRunning (false) + VolumeCreatorRunning (false), + MouseEventsCounter (0) { DisplayKeysCheckBox->SetValue (displayKeyInfo); #ifdef TC_WINDOWS DisplayKeysCheckBox->SetLabel (L""); @@ -34,8 +35,10 @@ namespace VeraCrypt #else ProgressGauge->SetMinSize (wxSize (-1, Gui->GetCharHeight (this) * 2)); #endif + CollectedEntropy->SetRange (RNG_POOL_SIZE * 8); + if (DisplayKeysCheckBox->IsChecked()) ShowBytes (RandomPoolSampleStaticText, RandomNumberGenerator::PeekPool(), true); else ShowAsterisks (RandomPoolSampleStaticText); @@ -183,5 +186,12 @@ namespace VeraCrypt ProgressBarRange = progressBarRange; RealProgressBarRange = ProgressGauge->GetSize().GetWidth(); ProgressGauge->SetRange (RealProgressBarRange); } + + void VolumeCreationProgressWizardPage::IncrementEntropyProgress () + { + ScopeLock lock (AccessMutex); + if (MouseEventsCounter < (RNG_POOL_SIZE * 8)) + CollectedEntropy->SetValue (++MouseEventsCounter); + } } |