pulsar-client-cpp
EncryptionKeyInfo.h
1 
19 #ifndef ENCRYPTIONKEYINFO_H_
20 #define ENCRYPTIONKEYINFO_H_
21 
22 #include <pulsar/defines.h>
23 
24 #include <iostream>
25 #include <map>
26 #include <memory>
27 
28 namespace pulsar {
29 
30 class EncryptionKeyInfoImpl;
31 class PulsarWrapper;
32 
33 typedef std::shared_ptr<EncryptionKeyInfoImpl> EncryptionKeyInfoImplPtr;
34 
35 class PULSAR_PUBLIC EncryptionKeyInfo {
36  /*
37  * This object contains the encryption key and corresponding metadata which contains
38  * additional information about the key such as version, timestammp
39  */
40 
41  public:
42  typedef std::map<std::string, std::string> StringMap;
43 
45 
50  EncryptionKeyInfo(std::string key, StringMap& metadata);
51 
55  std::string& getKey();
56 
62  void setKey(std::string key);
63 
67  StringMap& getMetadata(void);
68 
74  void setMetadata(StringMap& metadata);
75 
76  private:
77  explicit EncryptionKeyInfo(EncryptionKeyInfoImplPtr);
78 
79  EncryptionKeyInfoImplPtr impl_;
80 
81  friend class PulsarWrapper;
82 };
83 
84 } /* namespace pulsar */
85 
86 #endif /* ENCRYPTIONKEYINFO_H_ */
pulsar::EncryptionKeyInfo
Definition: EncryptionKeyInfo.h:35
pulsar
Definition: Authentication.h:31