STaR: Security transparency and reconfigurability for Wireless Sensor Networks programming