Fix bug in the simple crypt, add checkNetwork to DeviceUtil.java