public static function hashTransaction($transaction) {
        $salt = 'SALT';

        if ($salt != null) {

              $s = $salt . microtime() . $transaction->date . $transaction->description . $transaction->value;
              $hash = hash('sha512',$s,false);
        } else {
            throw new Exception("TransactionPersistance.hash_salt setting empty");
        }

        return $hash;
    }
public static function hashTransaction($transaction) {
        $salt = 'SALT';

        if ($salt != null) {

              $s = $salt . microtime() . $transaction->date . $transaction->description . $transaction->value;
              $hash = hash('sha512',$s,false);
        } else {
            throw new Exception("TransactionPersistance.hash_salt setting empty");
        }

        return $hash;
    }
public static function hashTransaction ( $ transaction ) { $ salt = 'SALT' ; if ( $ salt != null ) { $ s = $ salt . microtime ( ) . $ transaction -> date . $ transaction -> description . $ transaction -> value ; $ hash = hash ( 'sha512' , $ s , false ) ; } else { throw new Exception ( "TransactionPersistance.hash_salt setting empty" ) ; } return $ hash ; }
Generate transaction hash

@param Transaction transaction to hash
@return String Hash value
@throws Exception
Generate transaction hash