|
static CryptoKeyReaderPtr | create (const std::string &publicKeyPath, const std::string &privateKeyPath) |
|
◆ DefaultCryptoKeyReader()
pulsar::DefaultCryptoKeyReader::DefaultCryptoKeyReader |
( |
const std::string & |
publicKeyPath, |
|
|
const std::string & |
privateKeyPath |
|
) |
| |
The constructor of CryptoKeyReader
Configure the key reader to be used to decrypt the message payloads
- Parameters
-
publicKeyPath | the path to the public key |
privateKeyPath | the path to the private key |
- Since
- 2.8.0
◆ getPrivateKey()
Result pulsar::DefaultCryptoKeyReader::getPrivateKey |
( |
const std::string & |
keyName, |
|
|
std::map< std::string, std::string > & |
metadata, |
|
|
EncryptionKeyInfo & |
encKeyInfo |
|
) |
| const |
|
virtual |
Return the encryption key corresponding to the key name in the argument.
- Parameters
-
[in] | keyName | the unique name to identify the key |
[in] | metadata | the additional information needed to identify the key |
[out] | encKeyInfo | the EncryptionKeyInfo with details about the private key |
- Returns
- ResultOk
Implements pulsar::CryptoKeyReader.
◆ getPublicKey()
Result pulsar::DefaultCryptoKeyReader::getPublicKey |
( |
const std::string & |
keyName, |
|
|
std::map< std::string, std::string > & |
metadata, |
|
|
EncryptionKeyInfo & |
encKeyInfo |
|
) |
| const |
|
virtual |
Return the encryption key corresponding to the key name in the argument.
This method should be implemented to return the EncryptionKeyInfo. This method is called when creating producers as well as allowing consumers to receive messages. Consequently, the application should not make any blocking calls within the implementation.
- Parameters
-
[in] | keyName | the unique name to identify the key |
[in] | metadata | the additional information needed to identify the key |
[out] | encKeyInfo | the EncryptionKeyInfo with details about the public key |
- Returns
- ResultOk
Implements pulsar::CryptoKeyReader.
The documentation for this class was generated from the following file: