Index: media/crypto/decryptor_helpers.cc |
diff --git a/media/crypto/decryptor_helpers.cc b/media/crypto/decryptor_helpers.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..58154bf3528fe11c47245e6321570f2df9feabba |
--- /dev/null |
+++ b/media/crypto/decryptor_helpers.cc |
@@ -0,0 +1,17 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "media/crypto/decryptor_helpers.h" |
+ |
+#include "media/base/decrypt_config.h" |
+ |
+namespace media { |
+ |
+std::string GenerateCounterBlock(uint64 iv) { |
+ std::string counter_block(reinterpret_cast<char*>(&iv), sizeof(iv)); |
ddorwin
2012/09/01 16:46:41
I wonder if we'd be better off reserving the final
|
+ counter_block.append(DecryptConfig::kDecryptionKeySize - sizeof(iv), 0); |
+ return counter_block; |
+} |
+ |
+} // media |
xhwang
2012/08/29 05:08:14
// namespace media
|