You can use any security protocol that does not rely upon physical connection (such carefully measured imperfections in optical fibre) or very close proximity (such as Near Field Communication). Are you using the WLAN Toolbox ?
If you are creating your own software model of a WSN, then you are simulating transferring data between nodes. In such a case, you would have a routine that takes unencrypted simulated payloads and creates simulated data frames ready for simulated transmission.