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YwgagGA1UdIwSBoDCBnYAUBrDMqN1xo+Ps/Ye7KNea74Gv\n"
49 "R9ehgYGkfzB9MRYwFAYDVQQKEw1kY3BvbWF0aWMuY29tMRYwFAYDVQQLEw1kY3Bv\n"
50 "bWF0aWMuY29tMSQwIgYDVQQDExsuZGNwb21hdGljLnNtcHRlLTQzMC0yLlJPT1Qx\n"
51 "JTAjBgNVBC4THFc4YnBZTXkyVlF2WllDcGhOVWRqUVhLcGVNYz2CAQYwDQYJKoZI\n"
52 "hvcNAQELBQADggEBAHNocvxiWHwh0JKgf5cS1x7NHjnL9V5NSKRFH6qKZkSEWOdk\n"
53 "05+n99zxDzjh600DAAp8QIQ8FgC93TXsBg/owrKyZhVpDaRt5ZmUaLmmJUFBtEkJ\n"
54 "qmlXmZGu213zTCT1coMFNXiEImhUt/vd5JOmNsGydCyzEipr7vt8aDr/xCCJdcUo\n"
55 "y2Q5MfrD5wC4PgPBampSsbIu6IrTfx5kbrKIg/4X2VGFzyNDHz8N4+wfPGBuo4Ra\n"
56 "6YWAd58LUb1Wp7dP27HkQH74QRPvrVNOC4vcjnHnBtlWmFzGOi+1e4stWupL7IYd\n"
57 "Apivqyi9TqCUHkjLyuZPjEU30borxqrl918Z/Co=\n"
58 "-----END CERTIFICATE-----\n";
85 decrypted_kdm.add_key(
89 "01234567-89ab-cdef-0123-456789abcdef",
91 dcp::Key(
"00112233445566778899aabbccddeeff"),
93 "fedcba98-7654-3210-fedc-ba9876543210",
99 auto signer = std::make_shared<dcp::CertificateChain>(
"/usr/bin/openssl", 365);
105 auto encrypted_kdm = decrypted_kdm.encrypt(
109 dcp::Formulation::MODIFIED_TRANSITIONAL_1,
115 std::cout << encrypted_kdm.as_xml();
A wrapper for an X509 certificate.
A key for decrypting/encrypting assets.
A representation of a local time (down to the second), including its offset from GMT (equivalent to x...
void init(boost::optional< boost::filesystem::path > resources_directory=boost::optional< boost::filesystem::path >())
Utility methods and classes.