Fix params check before encrypt