This repository has been archived on 2024-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
zamek-hswro/HardcodedKeyStorage.cpp

37 lines
731 B
C++
Raw Normal View History

2017-12-17 11:31:13 +00:00
#include "HardcodedKeyStorage.h"
HardcodedKeyStorage::HardcodedKeyStorage():
keyTable( {
MifareClassicKey((const uint8_t[]) { 0x01, 0x02, 0x03, 0x04 }), // SAMPLE. DO NOT USE!
})
{}
HardcodedKeyStorage::~HardcodedKeyStorage() {}
bool HardcodedKeyStorage::contains(const Key& inputKey)
{
if(!inputKey.isValid())
return false;
for(const Key& keyFromTable: keyTable)
{
if(inputKey == keyFromTable)
return true;
}
return false;
}
bool HardcodedKeyStorage::insert(const Key &existingKey, const Key &newKey)
{
(void) existingKey;
(void) newKey;
return false;
}
bool HardcodedKeyStorage::remove(const Key &key)
{
(void) key;
return false;
}