MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / create

Method create

libminifi/src/utils/EncryptionProvider.cpp:43–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41} // namespace
42
43utils::optional<EncryptionProvider> EncryptionProvider::create(const std::string& home_path) {
44 minifi::Properties bootstrap_conf;
45 bootstrap_conf.setHome(home_path);
46 bootstrap_conf.loadConfigureFile(DEFAULT_NIFI_BOOTSTRAP_FILE);
47 return bootstrap_conf.getString(CONFIG_ENCRYPTION_KEY_PROPERTY_NAME)
48 | utils::map([](const std::string &encryption_key_hex) { return utils::StringUtils::from_hex(encryption_key_hex); })
49 | utils::map(&utils::crypto::stringToBytes)
50 | utils::map([](const utils::crypto::Bytes &encryption_key_bytes) { return EncryptionProvider{encryption_key_bytes}; });
51}
52
53} // namespace crypto
54} // namespace utils

Callers

nothing calls this directly

Calls 4

mapFunction · 0.85
setHomeMethod · 0.80
loadConfigureFileMethod · 0.80
getStringMethod · 0.45

Tested by

no test coverage detected