Merge pull request #350 from Douile/dev-base64-decode

Allow setting values from base64 values
This commit is contained in:
Ben Meadors
2022-07-28 17:42:08 -05:00
committed by GitHub

View File

@@ -64,6 +64,8 @@ def fromStr(valstr):
elif valstr.startswith('0x'):
# if needed convert to string with asBytes.decode('utf-8')
val = bytes.fromhex(valstr[2:])
elif valstr.startswith('base64:'):
val = base64.b64decode(valstr[7:])
elif valstr.lower() in {"t", "true", "yes"}:
val = True
elif valstr.lower() in {"f", "false", "no"}: