save security keys as a serialized string instead of exported variable.