19 #ifndef CRYPTOKEYREADER_H_
20 #define CRYPTOKEYREADER_H_
22 #include <pulsar/EncryptionKeyInfo.h>
23 #include <pulsar/Result.h>
24 #include <pulsar/defines.h>
52 virtual Result getPublicKey(
const std::string& keyName, std::map<std::string, std::string>& metadata,
63 virtual Result getPrivateKey(
const std::string& keyName, std::map<std::string, std::string>& metadata,
68 typedef std::shared_ptr<CryptoKeyReader> CryptoKeyReaderPtr;
72 std::string publicKeyPath_;
73 std::string privateKeyPath_;
74 void readFile(std::string fileName, std::string& fileContents)
const;
103 Result getPublicKey(
const std::string& keyName, std::map<std::string, std::string>& metadata,
116 Result getPrivateKey(
const std::string& keyName, std::map<std::string, std::string>& metadata,
118 static CryptoKeyReaderPtr create(
const std::string& publicKeyPath,
const std::string& privateKeyPath);