VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Core
ModeNameSize
-rw-r--r--Core.h7876logplain
-rw-r--r--Core.make991logplain
-rw-r--r--CoreBase.cpp9720logplain
-rw-r--r--CoreBase.h6213logplain
-rw-r--r--CoreException.cpp1041logplain
-rw-r--r--CoreException.h1905logplain
-rw-r--r--FatFormatter.cpp10879logplain
-rw-r--r--FatFormatter.h955logplain
-rw-r--r--HostDevice.cpp1704logplain
-rw-r--r--HostDevice.h1101logplain
-rw-r--r--MountOptions.cpp5850logplain
-rw-r--r--MountOptions.h2263logplain
-rw-r--r--RandomNumberGenerator.cpp5419logplain
-rw-r--r--RandomNumberGenerator.h2073logplain
d---------Unix622logplain
-rw-r--r--VolumeCreator.cpp11912logplain
-rw-r--r--VolumeCreator.h2791logplain
"Volume/Hash.h" #include "RandomPoolEnrichmentDialog.h" namespace VeraCrypt { RandomPoolEnrichmentDialog::RandomPoolEnrichmentDialog (wxWindow* parent) : RandomPoolEnrichmentDialogBase (parent) { RandomNumberGenerator::Start(); Hashes = Hash::GetAvailableAlgorithms(); foreach (shared_ptr <Hash> hash, Hashes) { if (!hash->IsDeprecated()) { HashChoice->Append (hash->GetName(), hash.get()); if (typeid (*hash) == typeid (*RandomNumberGenerator::GetHash())) HashChoice->Select (HashChoice->GetCount() - 1); } } ShowBytes (RandomPoolStaticText, RandomNumberGenerator::PeekPool().GetRange (0, 24)); MouseStaticText->Wrap (Gui->GetCharWidth (MouseStaticText) * 70); MainSizer->SetMinSize (wxSize (-1, Gui->GetCharHeight (this) * 24)); Layout(); Fit(); Center(); foreach (wxWindow *c, this->GetChildren()) c->Connect (wxEVT_MOTION, wxMouseEventHandler (RandomPoolEnrichmentDialog::OnMouseMotion), nullptr, this); } RandomPoolEnrichmentDialog::~RandomPoolEnrichmentDialog () { } void RandomPoolEnrichmentDialog::OnHashSelected (wxCommandEvent& event) { RandomNumberGenerator::SetHash (Gui->GetSelectedData <Hash> (HashChoice)->GetNew()); } void RandomPoolEnrichmentDialog::OnMouseMotion (wxMouseEvent& event) { event.Skip(); RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&event), sizeof (event))); long coord = event.GetX(); RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); coord = event.GetY(); RandomNumberGenerator::AddToPool (ConstBufferPtr (reinterpret_cast <byte *> (&coord), sizeof (coord))); if (ShowRandomPoolCheckBox->IsChecked()) ShowBytes (RandomPoolStaticText, RandomNumberGenerator::PeekPool().GetRange (0, 24)); } void RandomPoolEnrichmentDialog::OnShowRandomPoolCheckBoxClicked (wxCommandEvent& event) { if (!event.IsChecked()) RandomPoolStaticText->SetLabel (L""); } void RandomPoolEnrichmentDialog::ShowBytes (wxStaticText *textCtrl, const ConstBufferPtr &buffer) { wxString str; for (size_t i = 0; i < buffer.Size(); ++i) { str += wxString::Format (L"%02X", buffer[i]); } str += L".."; textCtrl->SetLabel (str.c_str()); for (size_t i = 0; i < str.size(); ++i) { str[i] = L'X'; } } }