Call CopyBuffer in Decrypt if key handle is empty

(Merged from go/wvgerrit/193672)

Bug: 320785945
Test: GTS + unit tests
Change-Id: I4a0c7568bf8323187f1156874ea98718511120f4
This commit is contained in:
Vicky Min
2024-03-12 21:55:15 +00:00
parent c5e171867b
commit 7fd4541eab
5 changed files with 69 additions and 34 deletions

View File

@@ -39,7 +39,8 @@ class KeySession {
CdmCipherMode cipher_mode) = 0;
virtual OEMCryptoResult Decrypt(
const OEMCrypto_SampleDescription* samples, size_t samples_length,
const OEMCrypto_CENCEncryptPatternDesc& pattern) = 0;
const OEMCrypto_CENCEncryptPatternDesc& pattern,
bool is_any_subsample_protected) = 0;
virtual OEMCryptoResult GenericEncrypt(const std::string& in_buffer,
const std::string& iv,
OEMCrypto_Algorithm algorithm,