from hashlib import blake2b import os import sys # MU3.Sys.System.keyIvDigestFixed KEY_IV_DIGEST_FIXED = bytes([ 179, 10, 98, 130, 17, 166, 184, 233, 246, 211, 46, 229, 236, 79, 78, 83, 107, 151, 195, 172, 57, 72, 120, 103, 17, 124, 18, 64, 15, 225, 169, 39 ]) if len(sys.argv) < 4: print(f"Usage: python {os.path.basename(__file__)} ") exit(1) with open(sys.argv[1], "rb") as f: key = blake2b( f.read(), digest_size=32, key=KEY_IV_DIGEST_FIXED, ).hexdigest() print(f"Key: {key}") with open(sys.argv[2], "rb") as f: iv = blake2b( f.read(), digest_size=32, key=KEY_IV_DIGEST_FIXED, ).hexdigest() print(f"IV: {iv}") with open(sys.argv[3], "rb") as f: salt = blake2b( f.read(), digest_size=32, key=KEY_IV_DIGEST_FIXED, ).hexdigest() print(f"Endpoint salt: {salt}")