closes Issue #598

the use of str_replace("\x0", '', $decryptedData);  result in the content of the cookie being changed

this pull request replaces this function with rtrim($decryptedData, "\0");  which will trim the trailing padding with
affecting the content of the encrypted cookie