remember current hash-algorithm when changing keys

* fixes [2935458]
This commit is contained in:
Christian Hohnstaedt 2010-01-22 07:42:45 +01:00
parent 44b9d7a664
commit 81dfbec931

View File

@ -56,6 +56,7 @@ const EVP_MD *hashBox::currentHash()
void hashBox::setupHashes(QList<int> nids)
{
QString md = currentText();
clear();
for (unsigned i=0; i<ARRAY_SIZE(hashalgos); i++) {
if (nids.contains(hashalgos[i].md->type)) {
@ -63,14 +64,17 @@ void hashBox::setupHashes(QList<int> nids)
}
}
setDefaultHash();
setCurrentIndex(findText(md));
}
void hashBox::setupAllHashes()
{
QString md = currentText();
clear();
for (unsigned i=0; i<ARRAY_SIZE(hashalgos); i++) {
addItem(QString(hashalgos[i].name));
}
setCurrentIndex(findText(md));
}
QString hashBox::currentHashName()