Network programming or over-the-air programming is very important function for wireless sensor networks (WSN). Because sensor nodes are updated with wireless connection, there could be many security threats, so we need cryptographically strong protocol. Some researches solve this problem by adapting digital signature and hash function. But digital signature based PKI needs many computational overhead, therefore these may not be acceptable for wireless sensor node. In some typical circumstances, the sensor network can have a few kinds of restriction. For example, sensor nodes can synchronize the time among them. Or broadcast message can be received over single hop. In this paper, we propose new secure network programming method using only hash function instead of PKI-based digital signature, which can be applied in those circumstances.