Using the PHP functions md5() (and sha1() as well) with a string like 'aabbccdd' works perfectly. However, using the same functions with 'a-b+ccdd' doesn't seem to produce a consistent result.
First question: Has the input string to be strictly alphanumeric, i.e. [A-Z][a-z][0..9] ?
Second question: Why do I get entirely different results using two different php files as follows:
file 1:
<?php
  $pwd = $_GET['pwd'];
  echo sha1($pwd); 
?>
and file 2 (only its beginning):
<?php session_start(); 
  $username = $_POST["username"];
  $pass = $_POST["password"];
  $password = sha1($pass); 
  echo "<br>pwd = " . $pass . "<br>PWD(SHA1) = " . $password . "<br>";
Does anyone see what's going wrong?
 
     
    