- xmlpp::Node* asset = write_to_cpl_base (node, standard, hash());
-
- if (key_id ()) {
- /* Find <Hash> */
- xmlpp::Node* hash = find_child (asset, "Hash");
- asset->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
- }
-
+ auto asset = write_to_cpl_asset (node, standard, hash());
+ write_to_cpl_encryptable (asset);