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

Method GetRawDataAsStdString

src/common/keypair.cpp:282–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280CCryptoKeyBase::~CCryptoKeyBase() {}
281
282bool CCryptoKeyBase::GetRawDataAsStdString( std::string *pString ) const
283{
284 pString->clear();
285 uint32 cbSize = GetRawData(nullptr);
286 if ( cbSize == 0 )
287 return false;
288 void *tmp = alloca( cbSize );
289 if ( GetRawData( tmp ) != cbSize )
290 {
291 Assert( false );
292 return false;
293 }
294 pString->assign( (const char *)tmp, cbSize );
295 SecureZeroMemory( tmp, cbSize );
296 return true;
297}
298
299bool CCryptoKeyBase::SetRawDataAndWipeInput( void *pData, size_t cbData )
300{

Callers 4

CreateCertFunction · 0.80
FinalizeLocalCryptoMethod · 0.80
SetLocalCertUnsignedMethod · 0.80
GenerateCertFunction · 0.80

Calls 3

SecureZeroMemoryFunction · 0.85
clearMethod · 0.80
assignMethod · 0.80

Tested by 1

GenerateCertFunction · 0.64