Crypto cipher updated;
Added Crypto cipher tests;
Some optimizations.