]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1138] {encode,decode}Hex() was erroneously used instead of
authorDima Volodin <dvv@isc.org>
Tue, 23 Aug 2011 12:23:17 +0000 (08:23 -0400)
committerDima Volodin <dvv@isc.org>
Mon, 10 Oct 2011 13:22:40 +0000 (09:22 -0400)
{encode,decode}Base64()

src/lib/dns/rdata/in_1/dhcid_49.cc

index 0a9a23c792868add48b31c23f344135a63a400ac..50d3002f5d6c87dd3544313af06e054537d3c0e7 100644 (file)
@@ -20,7 +20,7 @@
 #include <exceptions/exceptions.h>
 
 #include <util/buffer.h>
-#include <util/encode/hex.h>
+#include <util/encode/base64.h>
 #include <dns/exceptions.h>
 #include <dns/messagerenderer.h>
 #include <dns/rdata.h>
@@ -52,7 +52,7 @@ DHCID::DHCID(const string& dhcid_str) {
     stringbuf digestbuf;
 
     iss >> &digestbuf;
-    isc::util::encode::decodeHex(digestbuf.str(), digest_);
+    isc::util::encode::decodeBase64(digestbuf.str(), digest_);
 
     // RFC4701 states DNS software should consider the RDATA section to
     // be opaque, but there must be at least three bytes in the data:
@@ -112,7 +112,7 @@ DHCID::toWire(AbstractMessageRenderer& renderer) const {
 /// \return A string representation of \c DHCID.
 string
 DHCID::toText() const {
-    return (isc::util::encode::encodeHex(digest_));
+    return (isc::util::encode::encodeBase64(digest_));
 }
 
 /// \brief Compare two instances of \c DHCID RDATA.