mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2026-07-14 22:55:32 +08:00
Optimize with multithread
This commit is contained in:
@@ -46,3 +46,15 @@ void Mifare::setInputType(InputType tp)
|
||||
{
|
||||
inputType=tp;
|
||||
}
|
||||
|
||||
bool Mifare::isKeyValid(const QString key)
|
||||
{
|
||||
if(key.length() != 12)
|
||||
return false;
|
||||
for(int i = 0; i < 12; i++)
|
||||
{
|
||||
if(!((key[i] >= '0' && key[i] <= '9') || (key[i] >= 'A' && key[i] <= 'F')))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "common/util.h"
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
class Mifare : public QObject
|
||||
{
|
||||
@@ -25,6 +26,7 @@ public:
|
||||
|
||||
void setProcessingState(ProcessingState st);
|
||||
void setInputType(InputType tp);
|
||||
bool isKeyValid(const QString key);
|
||||
public slots:
|
||||
void processData(const QString str);
|
||||
void processKey(const QString str);
|
||||
|
||||
Reference in New Issue
Block a user