Fihing bug for checking encryptions lenght