Here is a PHP demo script that encrypts and decrypts data:
$encryptionkey = \'h8y2p9d1\'; $card_nbr = \"1234\"; echo \"original card_nbr: $card_nbr &
It seems to be a known problem. Use rtrim() after decoding to remove the excess NULs.
rtrim()