encoding: remove duplicate buf() and get() methods from Buffer class

Change-Id: If885d4199d6c9df9b9b46664c3641c9a14a77eab
diff --git a/src/security/transform/public-key.cpp b/src/security/transform/public-key.cpp
index 16dd3d1..1cf7e2e 100644
--- a/src/security/transform/public-key.cpp
+++ b/src/security/transform/public-key.cpp
@@ -98,7 +98,7 @@
 {
   OBufferStream os;
   streamSource(is) >> streamSink(os);
-  this->loadPkcs8(os.buf()->buf(), os.buf()->size());
+  this->loadPkcs8(os.buf()->data(), os.buf()->size());
 }
 
 void
@@ -106,7 +106,7 @@
 {
   OBufferStream os;
   bufferSource(buf, size) >> base64Decode() >> streamSink(os);
-  this->loadPkcs8(os.buf()->buf(), os.buf()->size());
+  this->loadPkcs8(os.buf()->data(), os.buf()->size());
 }
 
 void
@@ -114,7 +114,7 @@
 {
   OBufferStream os;
   streamSource(is) >> base64Decode() >> streamSink(os);
-  this->loadPkcs8(os.buf()->buf(), os.buf()->size());
+  this->loadPkcs8(os.buf()->data(), os.buf()->size());
 }
 
 void
@@ -184,7 +184,7 @@
     BOOST_THROW_EXCEPTION(Error("Failed to estimate output length"));
 
   auto out = make_shared<Buffer>(outlen);
-  if (EVP_PKEY_encrypt(ctx, out->buf(), &outlen, plainText, plainLen) <= 0)
+  if (EVP_PKEY_encrypt(ctx, out->data(), &outlen, plainText, plainLen) <= 0)
     BOOST_THROW_EXCEPTION(Error("Failed to encrypt plaintext"));
 
   out->resize(outlen);