Cryptography functions in C