Finished EntropyCollectionDlg.

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@110 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
tarek_saidi
2006-10-24 14:02:34 +00:00
parent 29f3d8b2b3
commit b9feb0b74d
7 changed files with 651 additions and 513 deletions

View File

@@ -20,12 +20,13 @@
#include <QPainter>
#include <QCursor>
#include "crypto/yarrow.h"
#include "CollectEntropyDlg.h"
#include "main.h"
CollectEntropyDlg::CollectEntropyDlg(QWidget* parent):QDialog(parent){
setupUi(this);
createBanner(&BannerPixmap,NULL,tr("Entropy Collection"),width());
createBanner(&BannerPixmap,Icon_Key32x32,tr("Entropy Collection"),width());
KeyEntropyBuffer=new unsigned char[105];
MouseEntropyBuffer=new quint16[210];
KeyCounter=0;
@@ -72,7 +73,9 @@ void CollectEntropyDlg::updateProgress(){
if(4*KeyCounter+4*MouseCounter>=420){
progressBar->setValue(420);
ReseedDone=true;
reseedStrongPool((quint8*)MouseEntropyBuffer,4*MouseCounter,KeyEntropyBuffer,KeyCounter);
Animation->stop();
stackedWidget->setCurrentIndex(1);
}
else
progressBar->setValue(4*KeyCounter+4*MouseCounter);