signature: reorganize code

In SignatureInfo, Signature, and its subclasses:

* Improve Doxygen.
* Improve error messages.
* Make comparison operators non-member functions.

refs #4171

Change-Id: I9395a72594702255b41e3700ee145f35fc1a41f2
diff --git a/src/security/signature-sha256-with-rsa.hpp b/src/security/signature-sha256-with-rsa.hpp
index 937794b..2466018 100644
--- a/src/security/signature-sha256-with-rsa.hpp
+++ b/src/security/signature-sha256-with-rsa.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -26,33 +26,32 @@
 
 namespace ndn {
 
-/**
- * Represent a SHA256-with-RSA signature.
+/** @brief Represents a signature of Sha256WithRsa type
+ *
+ *  This signature type provides integrity and provenance protection using a RSA signature over a
+ *  SHA-256 digest.
  */
 class SignatureSha256WithRsa : public Signature
 {
 public:
-  class Error : public Signature::Error
-  {
-  public:
-    explicit
-    Error(const std::string& what)
-      : Signature::Error(what)
-    {
-    }
-  };
-
+  /** @brief Create Sha256WithRsa signature with specified KeyLocator
+   */
   explicit
   SignatureSha256WithRsa(const KeyLocator& keyLocator = KeyLocator());
 
+  /** @brief Convert base Signature to Sha256WithRsa signature
+   *  @throw Signature::Error SignatureType is not Sha256WithRsa
+   */
   explicit
   SignatureSha256WithRsa(const Signature& signature);
 
 private:
+  /** @brief Prevent unsetting KeyLocator
+   */
   void
   unsetKeyLocator();
 };
 
 } // namespace ndn
 
-#endif //NDN_SECURITY_SIGNATURE_SHA256_WITH_RSA_HPP
+#endif // NDN_SECURITY_SIGNATURE_SHA256_WITH_RSA_HPP