title: PHP Equivalent of sha1.toString(CryptoJS.enc.Base64)
body: <p>I am converting a JS script into PHP.
  The script uses the CryptoJS library and generates a hash using the following line:</p>
  
  <pre><code>var sha1 = CryptoJS.SHA1("message");
  var sig = sha1.toString(CryptoJS.enc.Base64);
  </code></pre>
  
  <p>I have tried this php code</p>
  
  <pre><code>$sha1 = sha1("message");
  $sig = base64_encode($sha1);
  </code></pre>
  
  <p>But the signature isn't the same, it's longer in php.</p>
  
  <p>Your help is very much appreciated and needed !</p>
  
  <p>John</p>