Key is always entered as a string, but if security is WEP, the key is converted automatically to hex before connecting or configuring the device as an AP.