C++ version of RSA Digital Signature