diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-09-29 15:09:25 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-09-29 15:09:25 -0400 |
commit | 7a927b4d8270c017d533a29f1e21be8c6d595ba9 (patch) | |
tree | eb5973f36b717a5fa90ecf58073860f1a55d2d40 /asn.h | |
parent | bf8a765c32acf7d5b32bbcfc4642e5fe3ad9a9b4 (diff) | |
download | cryptopp-git-7a927b4d8270c017d533a29f1e21be8c6d595ba9.tar.gz |
Update BERDecodeTextString
Diffstat (limited to 'asn.h')
-rw-r--r-- | asn.h | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -13,6 +13,8 @@ #include "queue.h"
#include "misc.h"
+#include <iosfwd>
+
// Issue 340
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
# pragma GCC diagnostic push
@@ -138,7 +140,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API DEREncodeTextString(BufferedTransformation &bt, /// \param bt BufferedTransformation object for reading
/// \param str the string to encode
/// \param asnTag the ASN.1 type
-/// \details DEREncodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
+/// \details BERDecodeTextString() can be used for UTF8_STRING, PRINTABLE_STRING, and IA5_STRING
CRYPTOPP_DLL size_t CRYPTOPP_API BERDecodeTextString(BufferedTransformation &bt, std::string &str, byte asnTag);
/// \brief DER encode bit string
@@ -207,6 +209,8 @@ public: return m_values;
}
+ std::ostream& Print(std::ostream& out) const;
+
protected:
friend bool operator==(const OID &lhs, const OID &rhs);
friend bool operator!=(const OID &lhs, const OID &rhs);
@@ -805,6 +809,8 @@ inline bool operator<(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs) {return std::lexicographical_compare(lhs.m_values.begin(), lhs.m_values.end(), rhs.m_values.begin(), rhs.m_values.end());}
inline ::CryptoPP::OID operator+(const ::CryptoPP::OID &lhs, unsigned long rhs)
{return ::CryptoPP::OID(lhs)+=rhs;}
+inline std::ostream& operator<<(std::ostream& out, const OID &oid)
+ { return oid.Print(out); }
#endif
NAMESPACE_END
|