security: Separate TPM locator modification and database resetting in PIB

Change-Id: I80c2805b6e1204b95d59a090a6a04e1ee62fb6e5
Refs: #3203
diff --git a/src/security/pib/pib.hpp b/src/security/pib/pib.hpp
index 8f68f1f..3d73098 100644
--- a/src/security/pib/pib.hpp
+++ b/src/security/pib/pib.hpp
@@ -66,7 +66,6 @@
   };
 
 public:
-
   ~Pib();
 
   /**
@@ -87,21 +86,26 @@
   /**
    * @brief Set the corresponding TPM information to @p tpmLocator.
    *
-   * If the provided @p tpmLocator is different from the existing one, the
-   * PIB will be reset, otherwise nothing will be changed.
-   *
-   * @param tpmLocator The name for the new TPM locator
+   * If the provided @p tpmLocator is different from the existing one, PIB will be reset.
+   * Otherwise, nothing will be changed.
    */
   void
   setTpmLocator(const std::string& tpmLocator);
 
   /**
    * @brief Get TPM Locator
+   * @throws Error if TPM locator is empty
    */
   std::string
   getTpmLocator() const;
 
   /**
+   * @brief Reset content in PIB, including reset of the TPM locator
+   */
+  void
+  reset();
+
+  /**
    * @brief Get an identity with name @p identityName.
    *
    * @param identityName The name for the identity to get.
@@ -163,7 +167,7 @@
    * @param location The location for the Pib
    * @param impl The backend implementation
    */
-  Pib(const std::string scheme, const std::string& location, shared_ptr<PibImpl> impl);
+  Pib(const std::string& scheme, const std::string& location, shared_ptr<PibImpl> impl);
 
   shared_ptr<PibImpl>
   getImpl()