Exemplo n.º 1
0
bool                TypePointer( cg_type typ ) {
//==============================================

// Is CG-type a pointer?

    return( DataPointer( typ ) || ( typ == TY_CODE_PTR ) ||
            ( typ == TY_LONG_CODE_PTR ) || ( typ == TY_NEAR_CODE_PTR ) );
}
Exemplo n.º 2
0
CardDriverActivity::CardDriverActivity(const DataPointer& start) : RawCardDriverActivity(start),
	activityDataUncycled(readCyclicData()),
	cardActivityDailyRecords(Subblocks<CardActivityDailyRecord>::fromTypeAndLength(DataPointer(activityDataUncycled), activityDataUncycled.size()))
{
}
Exemplo n.º 3
0
bool EncryptedCertificate::attemptVerification(const RsaPublicKey& key){
	QByteArray srdash = key.perform(sign);
	if(srdash.size() != 128 || srdash.at(0) != 0x6A || (unsigned char)srdash[127] != 0xBC) return false;
	QByteArray crdash = srdash.mid(1, 106);
	QByteArray hdash = srdash.mid(107, 20);
	QByteArray cdash = crdash.append(cndash.toQByteArray()); // implicitly shared, but we do not need crdash anymore
	if(!checkSha1(cdash, hdash)) return false;
	decryptedCertificate = QSharedPointer<DecryptedCertificate>(new DecryptedCertificate(DataPointer(cdash)));
	return true;
}