Minor code cleanup

* Use php 5.6's hash_equals in compareHash
* Remove bsd licensed code I accidentally included in the first patch

Change-Id: Ia66e6ee34e8387dcd4bbc5524fa95b6e8e69bb35