/*
- Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
-#ifndef LIBDCP_DECRYPTED_KDM_H
-#define LIBDCP_DECRYPTED_KDM_H
/** @file src/decrypted_kdm.h
- * @brief DecryptedKDM class.
+ * @brief DecryptedKDM class
*/
+
+#ifndef LIBDCP_DECRYPTED_KDM_H
+#define LIBDCP_DECRYPTED_KDM_H
+
+
#include "key.h"
#include "local_time.h"
#include "decrypted_kdm_key.h"
-#include "types.h"
#include "certificate.h"
#include <boost/filesystem.hpp>
#include <boost/optional.hpp>
-class decrypted_kdm_test;
+
+struct decrypted_kdm_test;
+
namespace dcp {
+
class DecryptedKDMKey;
class EncryptedKDM;
class CertificateChain;
class CPL;
-class ReelMXF;
+class ReelFileAsset;
+
/** @class DecryptedKDM
- * @brief A decrypted KDM.
+ * @brief A decrypted KDM
*
* This is a KDM that has either been decrypted by a target private key, or one which
* has been created (by some other means) ready for encryption later.
*/
DecryptedKDM (
std::string cpl_id,
- std::map<std::shared_ptr<const ReelMXF>, Key> keys,
+ std::map<std::shared_ptr<const ReelFileAsset>, Key> keys,
LocalTime not_valid_before,
LocalTime not_valid_after,
std::string annotation_text,
boost::optional<int> disable_forensic_marking_audio
) const;
+ /** @param type (MDIK, MDAK etc.)
+ * @param key_id Key ID
+ * @param key The actual symmetric key
+ * @param cpl_id ID of CPL that the key is for
+ */
void add_key (boost::optional<std::string> type, std::string key_id, Key key, std::string cpl_id, Standard standard);
+
void add_key (DecryptedKDMKey key);
/** @return This KDM's (decrypted) keys, which could be used to decrypt assets. */
private:
- friend class ::decrypted_kdm_test;
+ friend struct ::decrypted_kdm_test;
static void put_uuid (uint8_t ** d, std::string id);
static std::string get_uuid (unsigned char ** p);
std::vector<DecryptedKDMKey> _keys;
};
+
}
+
#endif