and sorry for my bad english!
i used the php-blowfish implementation from here: http://www.php-einfach.de/diverses/php-verschluesselung-mittels-blowfish/ -or- http://www.php-einfach.de/wp-content/uploads/scripts/blowfish.zip
all works fine, i can encrypt and decrypt files like i want - but now i transfered the encrypted files to another server and here in ~ 1% of times the decryption goes wrong.
here is the relevant test-code:
require("blowfish.class.php");
$key = "ad31acd6f0a1eda8a3f54a94622bc9a3";
$cipher = "WZKcvwAEMEXkANZRfoES8xJmArzAwDbCNCskd0ve83OT6ubO1rZvRdzYb5h2qbhvHVklu4ZduBA";
$blowfish = new Blowfish( $key );
$DECfilename = $blowfish->Decrypt( $cipher );
There are no suspicious chars in key or cipher - nor in the correctly plain result ("2017-08-07_1053-Seebuehne_Bregenz_Selfie.jpg")
the original server is:
PHP Version 5.6.30, SunOS 5.10 Generic_150400-09 sun4u
the server with the problems are:
PHP Version 5.6.31, Linux 5dcbb2e6ba8c 4.11.12-041112-generic #201707210350 SMP Fri Jul 21 07:53:15 UTC 2017 x86_64
and another:
PHP Version 5.6.28, Linux ubuntu 3.13.0-101-generic #148-Ubuntu SMP Thu Oct 20 22:08:32 UTC 2016 x86_64
both alternativ-servers are equal in the failure, the decrypt the example above to something like
2017-08-f+ Y���+Seeb� 4�1[Ɵ z#Z 6�` �� ����� R
is this an environement thing? like i said, in 99% the other servers can decrypt the files, only very few are resistant. but the testcode is so reduced that there can't be an issue because of the transfer between the hosts, i think.