|
|
bool | getString (const std::string &key, std::string &value) noexcept override |
| Method to load string value from configuration. More...
|
|
bool | putString (const std::string &key, const std::string &value) noexcept override |
| Method to store string value into configuration. More...
|
|
bool | getBytes (const std::string &key, Bytes &value) noexcept override |
| Method to load binary value from configuration. More...
|
|
bool | putBytes (const std::string &key, const Bytes &value) noexcept override |
| Method to store binary value into configuration. More...
|
|
bool | remove (const std::string &key) noexcept override |
| Removes a property with a given name. More...
|
|
bool | getKeys (std::unordered_set< std::string > &valueContainer) noexcept override |
| Method to inspect existing properties. More...
|
|
bool | clear () noexcept override |
| Removes all properties from a configuration container. More...
|
|
virtual | ~PropertiesInterface () noexcept=default |
| Destructor. More...
|
|
|
| EncryptedProperties (const std::string &configUri, const std::shared_ptr< PropertiesInterface > &innerProperties, const std::shared_ptr< alexaClientSDK::acsdkCryptoInterfaces::CryptoFactoryInterface > &cryptoFactory, const std::shared_ptr< alexaClientSDK::acsdkCryptoInterfaces::KeyStoreInterface > &keyStore) noexcept |
|
bool | init () noexcept |
|
StatusCode | upgradeEncryption (RetryExecutor &executor, const std::unordered_set< std::string > &keys) noexcept |
|
StatusCode | loadAndDecryptDataKey (RetryExecutor &executor) noexcept |
|
bool | encryptAndEncodePropertyValue (const std::string &key, const Bytes &plaintext, Bytes &encodedCiphertext) noexcept |
|
bool | decodeAndDecryptPropertyValue (const std::string &key, const Bytes &encodedCiphertext, Bytes &plaintext) noexcept |
|
bool | encryptAndPutInternal (const std::string &key, const Bytes &plaintext) noexcept |
|
bool | getAndDecryptInternal (const std::string &key, Bytes &plaintext) noexcept |
|
StatusCode | generateAndStoreDataKeyWithRetries (RetryExecutor &executor) noexcept |
|
bool | loadKeysWithRetries (RetryExecutor &executor, std::unordered_set< std::string > &keys) noexcept |
|
bool | storeValueWithRetries (RetryExecutor &executor, const std::string &key, const Bytes &data, bool canDrop) noexcept |
|
bool | loadValueWithRetries (RetryExecutor &executor, const std::string &key, Bytes &data) noexcept |
|
bool | deleteValueWithRetries (RetryExecutor &executor, const std::string &key) noexcept |
|
bool | clearAllValuesWithRetries (RetryExecutor &executor) noexcept |
|
bool | executeKeyOperationWithRetries (RetryExecutor &executor, const std::string &operationName, const std::string &key, const std::function< bool()> &operation) noexcept |
|
bool | generateDataKeyWithRetries (RetryExecutor &executor) noexcept |
| Generate new data key. More...
|
|
bool | encryptAndEncodeDataKeyWithRetries (RetryExecutor &executor, Bytes &encoded) noexcept |
|
StatusCode | decodeAndDecryptDataKey (const Bytes &encoded) noexcept |
|
bool | encryptDataKey (std::string &mainKeyAlias, alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType &algorithmType, KeyChecksum &mainKeyChecksum, IV &dataKeyIV, DataBlock &dataKeyCiphertext, Tag &dataKeyTag) noexcept |
|
bool | decryptDataKey (const std::string &mainKeyAlias, alexaClientSDK::acsdkCryptoInterfaces::AlgorithmType dataKeyAlgorithm, const KeyChecksum &mainKeyChecksum, const IV &dataKeyIV, const DataBlock &keyCiphertext, const Tag &dataKeyTag) noexcept |
|
bool | doClear (RetryExecutor &helper) noexcept |
|
Properties adapter with field encryption.
This class wraps underlying PropertiesInterface with encryption support. All property values are encrypted on save and decrypted on load. When this adapter initializes for the first time, it automatically encrypts all fields. To manage encryption key, additional data is stored with '$acsdkEncryption$' property name. This property contains algorithms to use and encrypted data key. The data key itself is encrypted using HSM key store.
This class is thread safe and can be shared between multiple consumers.
bool alexaClientSDK::acsdkProperties::EncryptedProperties::putBytes |
( |
const std::string & |
key, |
|
|
const Bytes & |
value |
|
) |
| |
|
overridevirtualnoexcept |
Method to store binary value into configuration.
This method stores binary value into configuration. If there is an existing value for the the same key, the value is overwritten.
If operation fails, the implementation shall make a best effort for either keeping value unmodified, or clear it to prevent data corruption. Other properties shall not be impacted in case of an error.
- Parameters
-
[in] | key | Configuration key. |
[in] | value | Value to store. |
- Returns
- True if value has been stored, false otherwise. If this method returns false, the value may stay unchanged, or lost.
- See also
- getBytes
Implements alexaClientSDK::acsdkPropertiesInterfaces::PropertiesInterface.
bool alexaClientSDK::acsdkProperties::EncryptedProperties::putString |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
|
overridevirtualnoexcept |
Method to store string value into configuration.
This method stores string value into configuration. If there is an existing value for the the same key, the value is overwritten.
If operation fails, the implementation shall make a best effort for either keeping value unmodified, or clear it to prevent data corruption. Other properties shall not be impacted in case of an error.
- Parameters
-
[in] | key | Configuration key. |
[in] | value | Value to store. |
- Returns
- True if value has been stored, false otherwise. If this method returns false, the value may stay unchanged, or lost.
- See also
- getString
Implements alexaClientSDK::acsdkPropertiesInterfaces::PropertiesInterface.