A Secure Fog-Based Architecture for Industrial Internet of Things and Industry 4.0