-----------------------------------------------------------------------------
| 552 | |
| 553 | //----------------------------------------------------------------------------- |
| 554 | bool CCrypto::DecodeBase64ToBuf( const char *pszEncoded, uint32 cbEncoded, CUtlBuffer &buf ) |
| 555 | { |
| 556 | uint32 cubDecodeSize = cbEncoded * 3 / 4 + 1; |
| 557 | buf.EnsureCapacity( cubDecodeSize ); |
| 558 | if ( !CCrypto::Base64Decode( pszEncoded, cbEncoded, (uint8*)buf.Base(), &cubDecodeSize ) ) |
| 559 | return false; |
| 560 | buf.SeekPut( CUtlBuffer::SEEK_HEAD, cubDecodeSize ); |
| 561 | return true; |
| 562 | } |
| 563 | |
| 564 | //----------------------------------------------------------------------------- |
| 565 | bool CCrypto::DecodePEMBody( const char *pszPem, uint32 cch, CUtlBuffer &buf, const char *pszExpectedType ) |
nothing calls this directly
no test coverage detected