We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents da7fa31 + dfaf1a2 commit feca49fCopy full SHA for feca49f
meshtastic/__main__.py
@@ -1034,6 +1034,15 @@ def export_config(interface):
1034
prefs[meshtastic.util.snake_to_camel(pref)] = config[pref]
1035
else:
1036
prefs[pref] = config[pref]
1037
+ # mark base64 encoded fields as such
1038
+ if pref == "security":
1039
+ if 'privateKey' in prefs[pref]:
1040
+ prefs[pref]['privateKey'] = 'base64:' + prefs[pref]['privateKey']
1041
+ if 'publicKey' in prefs[pref]:
1042
+ prefs[pref]['publicKey'] = 'base64:' + prefs[pref]['publicKey']
1043
+ if 'adminKey' in prefs[pref]:
1044
+ for i in range(len(prefs[pref]['adminKey'])):
1045
+ prefs[pref]['adminKey'][i] = 'base64:' + prefs[pref]['adminKey'][i]
1046
if mt_config.camel_case:
1047
configObj["config"] = config
1048
0 commit comments