summaryrefslogtreecommitdiff
path: root/src/AS_DCP.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-06-24 23:45:27 +0200
committerCarl Hetherington <cth@carlh.net>2025-09-15 22:16:23 +0200
commit2eeee990f029779d8d1c2205b99a239bf87fbbe5 (patch)
tree8a5402633b55a447f03e07f7f061318f0a5164a6 /src/AS_DCP.h
parent6fe97406c72dd95339e4045679507b709dbefae2 (diff)
Hash to a vector of bytes rather than an ASCII string.2758-safe-write
Diffstat (limited to 'src/AS_DCP.h')
-rwxr-xr-xsrc/AS_DCP.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/AS_DCP.h b/src/AS_DCP.h
index acdf8c5..b332e1e 100755
--- a/src/AS_DCP.h
+++ b/src/AS_DCP.h
@@ -93,6 +93,7 @@ This project depends upon the following libraries:
#include <string>
#include <cstring>
#include <list>
+#include <vector>
//--------------------------------------------------------------------------------
// common integer types
@@ -782,7 +783,7 @@ namespace ASDCP {
// argument is present, the essence is encrypted prior to writing.
// Fails if the file is not open, is finalized, or an operating system
// error occurs.
- Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0, std::string* hash = 0);
+ Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0, std::vector<uint8_t>* hash = 0);
Result_t FakeWriteFrame(int size, FrameType_t frame_type, bool gop_start, bool closed_gop, ui8_t temporal_offset);
@@ -1279,7 +1280,7 @@ namespace ASDCP {
// A MD5 hash of the data that we write is written to hash if it is not 0
// Fails if the file is not open, is finalized, or an operating system
// error occurs.
- Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0, std::string* hash = 0);
+ Result_t WriteFrame(const FrameBuffer&, AESEncContext* = 0, HMACContext* = 0, std::vector<uint8_t>* hash = 0);
Result_t FakeWriteFrame(int size);
@@ -1398,7 +1399,7 @@ namespace ASDCP {
// RESULT_SPHASE will be returned if phase is reversed. The first frame
// written must be left eye.
Result_t WriteFrame(const FrameBuffer&, StereoscopicPhase_t phase,
- AESEncContext* = 0, HMACContext* = 0, std::string* hash = 0);
+ AESEncContext* = 0, HMACContext* = 0, std::vector<uint8_t>* hash = 0);
Result_t FakeWriteFrame(int size, StereoscopicPhase_t phase);