base64 and sha1 on iPhone

Lets be straight: here are two functions to add to your code to have base64 and hexadecimal version of the sha1 hash of an NSString.

To use it, simply copy the code in your class and use as this:

The base64 algorithm must be programmed by hand on iPhone!