Today there are two kinds of unencrypted DecoderBuffer:
// clear buffer in a clear stream
!buffer->decrypt_config()
// clear buffer in an encrypted stream
!buffer->decrypt_config()->is_encrypted())
This is very confusing. We should unify these two cases and make things simpler.
Comment 1 by masterwa...@gmail.com
, Dec 22 2016How about move |is_encrypted()| method from DecryptConfig to DecoderBuffer? // call in this unique way !buffer->is_encrypted() bool DecoderBuffer::is_encrypted() { return decrypt_config_ && !decrypt_config_->key_id_.empty() && !decrypt_config_->iv_.empty(); }