title: decode base64 encode string with salt
body: <p>I am using this piece of code to encrypt my password:-</p>
  
  <pre><code> public function hashSSHA($password) {
       $salt = sha1(rand());
      $salt = substr($salt, 0, 10);
      $encrypted = base64_encode(sha1($password . $salt, true) . $salt);
      $hash = array("salt" =&gt; $salt, "encrypted" =&gt; $encrypted);
      return $hash;
  }
  </code></pre>
  
  <p>Now I realize that, I need  reverse process of it. So I tried with this</p>
  
  <pre><code>base64_decode(sha1(str_replace($password, $salt), true) . $salt);
  </code></pre>
  
  <p>and this</p>
  
  <pre><code>base64_decode(str_replace(sha1(str_replace($password, $salt), true) , $salt));
  </code></pre>
  
  <p>to get my decrypted password, But none of working.</p>