avs-device-sdk/core/Properties/acsdkProperties/doc/PropertiesIMPL.dox

55 lines
2.3 KiB
Plaintext

/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/**
* \defgroup PropertiesIMPL Properties Implementation
* @brief Implementations for \ref PropertiesAPI
*
* PropertiesIMPL enables users to use PropertiesAPI instead of lower level MiscStorageInterface and SQLiteDatabase. In
* addition, this module offers data at rest protection using hardware security module.
*
* To use unencrypted adapter for \ref alexaClientSDK::acsdkProperties::MiscStorageInterface:
* \code{.cpp}
* #include <acsdkProperties/PropertiesFactories.h>
*
* std::shared_ptr<MiscStorageInterface> miscStorage = ...;
* auto factory = createPropertiesFactory(miscStorage);
* auto properties = propertiesFactory->getProperties("componentName", "configNamespace");
* properties->putString("propertyName", "stringValue");
* \endcode
*
* The following example demonstrates how to use encrypted properties:
* \code{.cpp}
* #include <acsdkProperties/EncryptedPropertiesFactories.h>
*
* std::shared_ptr<MiscStorageInterface> miscStorage = ...;
* std::shared_ptr<CryptoFactoryInterface> cryptoFactory = ...;
* std::shared_ptr<KeyStoreInterface> keyStore = ...;
*
* auto factory = createEncryptedPropertiesFactory(cryptoFactory, keyStore, miscStorage);
* auto properties = propertiesFactory->getProperties("componentName", "configNamespace");
* properties->putString("propertyName", "stringValue");
* \endcode
*
* Encryption at rest requires that CryptoAPI support is available and the platform has correctly configured
* hardware security module.
*
* \sa CryptoIMPL how to obtain \ref alexaClientSDK::acsdkCryptoInterfaces::CryptoFactoryInterface.
* \sa PKCS11IMPL how to obtain \ref alexaClientSDK::acsdkCryptoInterfaces::KeyStoreInterface and configure HSM.
*
* \sa alexaClientSDK::acsdkProperties
* \sa alexaClientSDK::acsdkProperties::test
*/