I recently did a code review assessment on an application for one of my client. The best part of the application was their own cryptography algorithm.
Moreover, the application was written in PHP and PHP do some strange things with string, characters and XOR operations. It only needed a few lines of python in order to break it.
TL;DR : please do not write your own crypto!