Monthly Archiv: December, 2007
Simple example of the ROT13 algorithm. ROT13 is a simple function which rotates the
characters of a string 13 places forward.
Hint:
Since PHP 4+ you can use the PHP build-in function str_rot13.
This is just a example implementation to show how it works.
This example shows how to delete specific files
after a given time span.
This works good for cleaning cached files.
Below is a MD5-based block cipher (MDC-like), which works in 128bit CFB mode.
It is very useful to encrypt secret data before transfer it over the network.
This snippet converts a “dirty” string that may contain special characters into a machine compatible nice looking string.
That function works fine for creating urls or ID keys.