當前位置: 首頁>>代碼示例>>C++>>正文


C++ CRYPTOPP_UNUSED函數代碼示例

本文整理匯總了C++中CRYPTOPP_UNUSED函數的典型用法代碼示例。如果您正苦於以下問題:C++ CRYPTOPP_UNUSED函數的具體用法?C++ CRYPTOPP_UNUSED怎麽用?C++ CRYPTOPP_UNUSED使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了CRYPTOPP_UNUSED函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: EncryptionPairwiseConsistencyTest_FIPS_140_Only

void EncryptionPairwiseConsistencyTest_FIPS_140_Only(const PK_Encryptor &encryptor, const PK_Decryptor &decryptor)
{
	CRYPTOPP_UNUSED(encryptor), CRYPTOPP_UNUSED(decryptor);
#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
	EncryptionPairwiseConsistencyTest(encryptor, decryptor);
#endif
}
開發者ID:prakhs123,項目名稱:cryptopp,代碼行數:7,代碼來源:fips140.cpp

示例2: CRYPTOPP_UNUSED

void RDSEED::GenerateBlock(byte *output, size_t size)
{
	CRYPTOPP_UNUSED(output), CRYPTOPP_UNUSED(size);
	CRYPTOPP_ASSERT((output && size) || !(output || size));

	if(!HasRDSEED())
		throw NotImplemented("RDSEED: rdseed is not available on this platform");

	int rc; CRYPTOPP_UNUSED(rc);
#if MASM_RDSEED_ASM_AVAILABLE
	rc = MASM_RSA_GenerateBlock(output, size, m_retries);
	if (!rc) { throw RDSEED_Err("MASM_RSA_GenerateBlock"); }
#elif NASM_RDSEED_ASM_AVAILABLE
	rc = NASM_RSA_GenerateBlock(output, size, m_retries);
	if (!rc) { throw RDRAND_Err("NASM_RSA_GenerateBlock"); }
#elif ALL_RDSEED_INTRIN_AVAILABLE
	rc = ALL_RSI_GenerateBlock(output, size, m_retries);
	if (!rc) { throw RDSEED_Err("ALL_RSI_GenerateBlock"); }
#elif GCC_RDSEED_ASM_AVAILABLE
	rc = GCC_RSA_GenerateBlock(output, size, m_retries);
	if (!rc) { throw RDSEED_Err("GCC_RSA_GenerateBlock"); }
#else
	// RDSEED not detected at compile time, and no suitable compiler found
	throw NotImplemented("RDSEED: failed to find a suitable implementation???");
#endif
}
開發者ID:xyliuke,項目名稱:plan9,代碼行數:26,代碼來源:rdrand.cpp

示例3: CRYPTOPP_UNUSED

void OFB_ModePolicy::CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length)
{
	CRYPTOPP_UNUSED(keystreamBuffer), CRYPTOPP_UNUSED(length);
	CRYPTOPP_ASSERT(length == BlockSize());

	CopyOrZero(m_register, iv, length);
}
開發者ID:superbitcoin,項目名稱:SuperBitcoin,代碼行數:7,代碼來源:modes.cpp

示例4: CRYPTOPP_UNUSED

void PKCS1v15_SignatureMessageEncodingMethod::ComputeMessageRepresentative(RandomNumberGenerator &rng,
	const byte *recoverableMessage, size_t recoverableMessageLength,
	HashTransformation &hash, HashIdentifier hashIdentifier, bool messageEmpty,
	byte *representative, size_t representativeBitLength) const
{
	CRYPTOPP_UNUSED(rng), CRYPTOPP_UNUSED(recoverableMessage), CRYPTOPP_UNUSED(recoverableMessageLength);
	CRYPTOPP_UNUSED(messageEmpty), CRYPTOPP_UNUSED(hashIdentifier);
	CRYPTOPP_ASSERT(representativeBitLength >= MinRepresentativeBitLength(hashIdentifier.second, hash.DigestSize()));

	size_t pkcsBlockLen = representativeBitLength;
	// convert from bit length to byte length
	if (pkcsBlockLen % 8 != 0)
	{
		representative[0] = 0;
		representative++;
	}
	pkcsBlockLen /= 8;

	representative[0] = 1;   // block type 1

	unsigned int digestSize = hash.DigestSize();
	byte *pPadding = representative + 1;
	byte *pDigest = representative + pkcsBlockLen - digestSize;
	byte *pHashId = pDigest - hashIdentifier.second;
	byte *pSeparator = pHashId - 1;

	// pad with 0xff
	memset(pPadding, 0xff, pSeparator-pPadding);
	*pSeparator = 0;
	memcpy(pHashId, hashIdentifier.first, hashIdentifier.second);
	hash.Final(pDigest);
}
開發者ID:Audifire,項目名稱:mtasa-blue,代碼行數:32,代碼來源:pkcspad.cpp

示例5: SignaturePairwiseConsistencyTest_FIPS_140_Only

void SignaturePairwiseConsistencyTest_FIPS_140_Only(const PK_Signer &signer, const PK_Verifier &verifier)
{
	CRYPTOPP_UNUSED(signer), CRYPTOPP_UNUSED(verifier);
#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
	SignaturePairwiseConsistencyTest(signer, verifier);
#endif
}
開發者ID:prakhs123,項目名稱:cryptopp,代碼行數:7,代碼來源:fips140.cpp

示例6: CRYPTOPP_UNUSED

void CTR_ModePolicy::CipherResynchronize(byte *keystreamBuffer, const byte *iv, size_t length)
{
	CRYPTOPP_UNUSED(keystreamBuffer), CRYPTOPP_UNUSED(length);
	assert(length == BlockSize());

	CopyOrZero(m_register, iv, length);
	m_counterArray = m_register;
}
開發者ID:BreakoutCoin,項目名稱:Breakout-Chain-Client,代碼行數:8,代碼來源:modes.cpp

示例7: CRYPTOPP_UNUSED

bool RWFunction::Validate(RandomNumberGenerator &rng, unsigned int level) const
{
	CRYPTOPP_UNUSED(rng), CRYPTOPP_UNUSED(level);
	bool pass = true;
	pass = pass && m_n > Integer::One() && m_n%8 == 5;
	CRYPTOPP_ASSERT(pass);
	return pass;
}
開發者ID:Mellnik,項目名稱:hash-plugin,代碼行數:8,代碼來源:rw.cpp

示例8: CRYPTOPP_UNUSED

bool LUCFunction::Validate(RandomNumberGenerator &rng, unsigned int level) const
{
	CRYPTOPP_UNUSED(rng), CRYPTOPP_UNUSED(level);
	bool pass = true;
	pass = pass && m_n > Integer::One() && m_n.IsOdd();
	pass = pass && m_e > Integer::One() && m_e.IsOdd() && m_e < m_n;
	return pass;
}
開發者ID:someone9388,項目名稱:cryptopp,代碼行數:8,代碼來源:luc.cpp

示例9: CRYPTOPP_UNUSED

void ChaCha_Policy::CipherResynchronize(byte *keystreamBuffer, const byte *IV, size_t length)
{
    CRYPTOPP_UNUSED(keystreamBuffer), CRYPTOPP_UNUSED(length);
    CRYPTOPP_ASSERT(length==8);

    GetBlock<word32, LittleEndian> get(IV);
    m_state[12] = m_state[13] = 0;
    get(m_state[14])(m_state[15]);
}
開發者ID:bonjorno7,項目名稱:GAME,代碼行數:9,代碼來源:chacha.cpp

示例10: BenchMarkByNameKeyLess

void BenchMarkByNameKeyLess(const char *factoryName, const char *displayName=NULL, const NameValuePairs &params = g_nullNameValuePairs, T *x=NULL)
{
	CRYPTOPP_UNUSED(x), CRYPTOPP_UNUSED(params);

	std::string name = factoryName;
	if (displayName)
		name = displayName;

	member_ptr<T> obj(ObjectFactoryRegistry<T>::Registry().CreateObject(factoryName));
	BenchMark(name.c_str(), *obj, g_allocatedTime);
}
開發者ID:CryptoDJ,項目名稱:DarkSilk-Release-Candidate,代碼行數:11,代碼來源:bench.cpp

示例11: CRYPTOPP_UNUSED

void RandomNumberGenerator::GenerateBlock(byte *output, size_t size)
{
	CRYPTOPP_UNUSED(output), CRYPTOPP_UNUSED(size);

#if 0
	// This breaks AutoSeededX917RNG<T> generators.
	throw NotImplemented("RandomNumberGenerator: GenerateBlock not implemented");
#endif

	ArraySink s(output, size);
	GenerateIntoBufferedTransformation(s, DEFAULT_CHANNEL, size);
}
開發者ID:13971643458,項目名稱:qtum,代碼行數:12,代碼來源:cryptlib.cpp

示例12: CRYPTOPP_UNUSED

bool FileSink::IsolatedFlush(bool hardFlush, bool blocking)
{
	CRYPTOPP_UNUSED(hardFlush), CRYPTOPP_UNUSED(blocking);
	if (!m_stream)
		throw Err("FileSink: output stream not opened");

	m_stream->flush();
	if (!m_stream->good())
		throw WriteErr();

	return false;
}
開發者ID:BreakoutCoin,項目名稱:Breakout-Chain-Client,代碼行數:12,代碼來源:files.cpp

示例13: CRYPTOPP_UNUSED

size_t ArrayXorSink::Put2(const byte *begin, size_t length, int messageEnd, bool blocking)
{
	CRYPTOPP_UNUSED(messageEnd); CRYPTOPP_UNUSED(blocking);

	// Avoid passing NULL pointer to xorbuf
	size_t copied = 0;
	if (m_buf && begin)
	{
		copied = STDMIN(length, SaturatingSubtract(m_size, m_total));
		xorbuf(m_buf+m_total, begin, copied);
	}
	m_total += copied;
	return length - copied;
}
開發者ID:prakhs123,項目名稱:cryptopp,代碼行數:14,代碼來源:filters.cpp

示例14: SetPowerUpSelfTestInProgressOnThisThread

void SetPowerUpSelfTestInProgressOnThisThread(bool inProgress)
{
	CRYPTOPP_UNUSED(inProgress);
#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
	s_inProgress = inProgress;
#endif
}
開發者ID:anonimal,項目名稱:cryptopp,代碼行數:7,代碼來源:fips140.cpp

示例15: SetPowerUpSelfTestInProgressOnThisThread

void SetPowerUpSelfTestInProgressOnThisThread(bool inProgress)
{
	CRYPTOPP_UNUSED(inProgress);
#if CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2
	AccessPowerUpSelfTestInProgress().SetValue((void *)inProgress);
#endif
}
開發者ID:prakhs123,項目名稱:cryptopp,代碼行數:7,代碼來源:fips140.cpp


注:本文中的CRYPTOPP_UNUSED函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。