Collection of common cryptography functions