| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_ENCRYPTION_SCHEME_H_ | 5 #ifndef MEDIA_BASE_ENCRYPTION_SCHEME_H_ |
| 6 #define MEDIA_BASE_ENCRYPTION_SCHEME_H_ | 6 #define MEDIA_BASE_ENCRYPTION_SCHEME_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 // Specification of whether and how the stream is encrypted (in whole or part). | 14 // Specification of whether and how the stream is encrypted (in whole or part). |
| 15 class MEDIA_EXPORT EncryptionScheme { | 15 class MEDIA_EXPORT EncryptionScheme { |
| 16 public: | 16 public: |
| 17 // Algorithm and mode used for encryption. CIPHER_MODE_UNENCRYPTED indicates | 17 // Algorithm and mode used for encryption. CIPHER_MODE_UNENCRYPTED indicates |
| 18 // no encryption. | 18 // no encryption. |
| 19 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media |
| 19 enum CipherMode { | 20 enum CipherMode { |
| 20 CIPHER_MODE_UNENCRYPTED, | 21 CIPHER_MODE_UNENCRYPTED, |
| 21 CIPHER_MODE_AES_CTR, | 22 CIPHER_MODE_AES_CTR, |
| 22 CIPHER_MODE_AES_CBC, | 23 CIPHER_MODE_AES_CBC, |
| 23 CIPHER_MODE_MAX = CIPHER_MODE_AES_CBC | 24 CIPHER_MODE_MAX = CIPHER_MODE_AES_CBC |
| 24 }; | 25 }; |
| 25 | 26 |
| 26 // CENC 3rd Edition adds pattern encryption, through two new protection | 27 // CENC 3rd Edition adds pattern encryption, through two new protection |
| 27 // schemes: 'cens' (with AES-CTR) and 'cbcs' (with AES-CBC). | 28 // schemes: 'cens' (with AES-CTR) and 'cbcs' (with AES-CBC). |
| 28 // The pattern applies independently to each 'encrypted' part of the frame (as | 29 // The pattern applies independently to each 'encrypted' part of the frame (as |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 private: | 71 private: |
| 71 CipherMode mode_ = CIPHER_MODE_UNENCRYPTED; | 72 CipherMode mode_ = CIPHER_MODE_UNENCRYPTED; |
| 72 Pattern pattern_; | 73 Pattern pattern_; |
| 73 | 74 |
| 74 // Allow copy and assignment. | 75 // Allow copy and assignment. |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace media | 78 } // namespace media |
| 78 | 79 |
| 79 #endif // MEDIA_BASE_ENCRYPTION_SCHEME_H_ | 80 #endif // MEDIA_BASE_ENCRYPTION_SCHEME_H_ |
| OLD | NEW |