Cryptography is very difficult. It is even more difficult to tell if you have done it correctly.

If you design and implement your own cryptographic algorithm, the odds are that you will fail to create a secure system.

It is much better to code your application to use an existing cryptographic library which has been tested with extensive peer review.

Adam Shostack maintains a good list of cryptographic libraries at Source Available Cryptographic Libraries.

PCL is an interesting cryptanalysis library with functions for dictionary attacks and brute force attacks.