Some arguments sanity checks in CryptoP in order to avoid app crash.

* TODO: add sanity checks to all methods.