Paul J. Lucas has proposed merging lp:~zorba-coders/zorba/bug-1158052-security 
into lp:zorba/security-module.

Commit message:
Corresponding changes for bug #1158052.

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1158052-security/+merge/170950

Corresponding changes for bug #1158052.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1158052-security/+merge/170950
Your team Zorba Coders is subscribed to branch lp:zorba/security-module.
=== modified file 'src/hash.xq.src/hash.h'
--- src/hash.xq.src/hash.h	2013-06-12 05:17:59 +0000
+++ src/hash.xq.src/hash.h	2013-06-22 13:18:25 +0000
@@ -132,24 +132,28 @@
             lLen = lTmpDecodedBuf.size();
           }
           (*hash)(
-              reinterpret_cast<const unsigned char*>(lTmp),
-              lLen,
-              &lBuf[0]
-            );
+            reinterpret_cast<const unsigned char*>(lTmp),
+            lLen,
+            &lBuf[0]
+          );
         }
         else
         {
           String lTmp = aMessage.getStringValue();
           (*hash)(
-              reinterpret_cast<const unsigned char*>(lTmp.data()),
-              lTmp.size(),
-              &lBuf[0]
-            );
+            reinterpret_cast<const unsigned char*>(lTmp.data()),
+            lTmp.size(),
+            &lBuf[0]
+          );
         }
       }
-      return
-        zorba::ItemSequence_t(new zorba::SingletonItemSequence(
-              getItemFactory()->createBase64Binary(&lBuf[0], DIGEST_LENGTH)));
+      return zorba::ItemSequence_t(
+        new zorba::SingletonItemSequence(
+          getItemFactory()->createBase64Binary(
+            reinterpret_cast<char const*>(&lBuf[0]), DIGEST_LENGTH, false
+          )
+        )
+      );
     }
   };
 
@@ -203,3 +207,4 @@
 } /* namespace zorba */
 
 #endif
+/* vim:set et sw=2 ts=2: */

=== modified file 'src/hmac.xq.src/hmac.cpp'
--- src/hmac.xq.src/hmac.cpp	2013-06-12 05:17:59 +0000
+++ src/hmac.xq.src/hmac.cpp	2013-06-22 13:18:25 +0000
@@ -164,8 +164,13 @@
   HMAC_Final(&ctx, out, &len);
   HMAC_cleanup(&ctx);
 
-  return zorba::ItemSequence_t(new zorba::SingletonItemSequence(
-        theModule->getItemFactory()->createBase64Binary(&out[0], len)));
+  return zorba::ItemSequence_t(
+    new zorba::SingletonItemSequence(
+      theModule->getItemFactory()->createBase64Binary(
+        reinterpret_cast<char const*>(&out[0]), len, false
+      )
+    )
+  );
 }
 
 zorba::ItemSequence_t
@@ -227,8 +232,13 @@
   HMAC_Final(&ctx, out, &len);
   HMAC_cleanup(&ctx);
 
-  return zorba::ItemSequence_t(new zorba::SingletonItemSequence(
-        theModule->getItemFactory()->createBase64Binary(&out[0], len)));
+  return zorba::ItemSequence_t(
+    new zorba::SingletonItemSequence(
+      theModule->getItemFactory()->createBase64Binary(
+        reinterpret_cast<char const*>(&out[0]), len, false
+      )
+    )
+  );
 }
 
 } /* namespace security */ } /* namespace zorba */
@@ -242,3 +252,5 @@
 extern "C" DLL_EXPORT zorba::ExternalModule* createModule() {
   return new zorba::security::HMACModule();
 }
+
+/* vim:set et sw=2 ts=2: */

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to