scrypt/nscrypt code optimization and cleanup.
Use shaders param if provided.