def create_key_file(path):
iv = "<STR_LIT>".format(os.urandom(<NUM_LIT:32>), time.time())<EOL>new_key = generate_key(ensure_bytes(iv))<EOL>with open(path, "<STR_LIT:wb>") as f:<EOL><INDENT>f.write(base64.b64encode(new_key))<EOL><DEDENT>os.chmod(path, <NUM_LIT>)<EOL>
Creates a new encryption key in the path provided and sets the file
permissions.  Setting the file permissions currently does not work
on Windows platforms because of the differences in how file
permissions are read and modified.