| 381 | } |
| 382 | |
| 383 | void CCryptoKeyBase::CopyFrom( const CCryptoKeyBase &x ) |
| 384 | { |
| 385 | Assert( m_eKeyType == x.m_eKeyType ); |
| 386 | Wipe(); |
| 387 | |
| 388 | uint32 cbData = x.GetRawData( nullptr ); |
| 389 | if ( cbData == 0 ) |
| 390 | return; |
| 391 | void *tmp = alloca( cbData ); |
| 392 | VerifyFatal( x.GetRawData( tmp ) == cbData ); |
| 393 | VerifyFatal( SetRawDataAndWipeInput( tmp, cbData ) ); |
| 394 | } |
| 395 | |
| 396 | bool CCryptoKeyBase::LoadFromAndWipeBuffer( void *pBuffer, size_t cBytes ) |
| 397 | { |
no test coverage detected