Swat/SwatString.php
public static function signedSerialize($data, $salt)
    {
        $serialized_data = serialize($data);
        $signature_data = self::hash($serialized_data . (string) $salt);

        return $signature_data . '|' . $serialized_data;
    }
public static function signedSerialize($data, $salt)
    {
        $serialized_data = serialize($data);
        $signature_data = self::hash($serialized_data . (string) $salt);

        return $signature_data . '|' . $serialized_data;
    }
public static function signedSerialize ( $ data , $ salt ) { $ serialized_data = serialize ( $ data ) ; $ signature_data = self :: hash ( $ serialized_data . ( string ) $ salt ) ; return $ signature_data . '|' . $ serialized_data ; }
Serializes and signs a value using a salt

By signing serialized data, it is possible to detect tampering of
serialized data. This is useful if serialized data is accepted from
user editable <code>$_GET</code>, <code>$_POST</code> or
<code>$_COOKIE data</code>.

@param mixed $data the data to serialize.
@param string $salt the signature salt.

@return string the signed serialized value.

@see SwatString::signedSerialize()
Serializes and signs a value using a salt