src/PowerAuth/protocol/PrivateTypes.cpp
//
// For a historical reasons, we still have to support old persistent data format,
// which has been used in very old, closed source version of PowerAuth library.
//
// Once all users will migrate to app based on our open source library, then this
// code will be removed.
//
// DATA_MIGRATION_TAG
For a historical reasons, we still have to support old persistent data format,
which has been used in very old, closed source version of PowerAuth library.

Once all users will migrate to app based on our open source library, then this
code will be removed.


For a historical reasons we still have to support old persistent data format which has been used in very old closed source version of PowerAuth library . Once all users will migrate to app based on our open source library then this code will be removed .
static bool _old_readData(utils::DataReader & reader, cc7::ByteArray & out_data, size_t expected_size = 0)
	{
		uint16_t size;
		if (!reader.readU16(size)) {
			return false;
		}
		if (expected_size > 0 && expected_size != size) {
			return false;
		}
		if (!reader.readMemory(out_data, size)) {
			return false;
		}
		return true;
	}
static bool _old_readData ( utils :: DataReader & reader , cc7 :: ByteArray & out_data , size_t expected_size = 0 ) { uint16_t size ; if ( ! reader . readU16 ( size ) ) { return false ; } if ( expected_size > 0 && expected_size != size ) { return false ; } if ( ! reader . readMemory ( out_data , size ) ) { return false ; } return true ; }
For a historical reasons, we still have to support old persistent data format,
which has been used in very old, closed source version of PowerAuth library.
For a historical reasons we still have to support old persistent data format which has been used in very old closed source version of PowerAuth library .