feat: Add if decrypt failed logic.
This commit is contained in:
@@ -92,6 +92,10 @@ PatientData PatientDataReader::getPatientDataFromHJ(const std::string& aFilePath
|
||||
stream.read(patientCString,aConfigHeader->getPatientLength());
|
||||
std::string patientJsonString = patientCString;
|
||||
patientJsonString = AESEncryptHelper::decrypt(patientJsonString);
|
||||
if(patientJsonString.empty())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
nlohmann::json jsonObj = nlohmann::json::parse(patientJsonString);
|
||||
if(!jsonObj.contains("Patient Info"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user