Use a QByteArray for key storage

Convert to hex only when necessary.
Modified comment