MCPcopy Create free account
hub / github.com/ValveSoftware/GameNetworkingSockets / BMatchesRawData

Method BMatchesRawData

src/common/keypair.cpp:372–381  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Purpose: Return true if our raw data matches the the specified buffer -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

370// Purpose: Return true if our raw data matches the the specified buffer
371//-----------------------------------------------------------------------------
372bool CCryptoKeyBase::BMatchesRawData( const void *pData, size_t cbData ) const
373{
374 uint32 cbMyRawData = GetRawData(nullptr);
375 if ( cbMyRawData != cbData ) return false;
376
377 CAutoWipeBuffer bufMyRawData( cbMyRawData );
378 DbgVerify( GetRawData( bufMyRawData.Base() ) == cbMyRawData );
379
380 return memcmp( bufMyRawData.Base(), pData, cbData ) == 0;
381}
382
383void CCryptoKeyBase::CopyFrom( const CCryptoKeyBase &x )
384{

Callers 1

Calls 1

BaseMethod · 0.45

Tested by

no test coverage detected