nvflare.lighter.utils module

generate_password(passlen=16)[source]
load_crt(path)[source]
load_crt_bytes(data: bytes)[source]
load_private_key(data: str)[source]
load_private_key_file(file_path)[source]
load_yaml(file)[source]
serialize_cert(cert)[source]
serialize_pri_key(pri_key)[source]
sh_replace(src, mapping_dict)[source]
sign_all(content_folder, signing_pri_key)[source]
sign_content(content, signing_pri_key, return_str=True)[source]
sign_folders(folder, signing_pri_key, crt_path, max_depth=9999)[source]
update_overseer_server_name(project_config, old_server_name, server_name)[source]
update_participant_server_name(project_config, old_server_name, new_server_name)[source]
update_project_server_name(project_file: str, old_server_name, server_name)[source]
update_project_server_name_config(project_config: dict, old_server_name, server_name) dict[source]
update_storage_locations(local_dir: str, workspace: str, default_resource_name: str = 'resources.json.default', job_storage_name: str = 'jobs-storage', snapshot_storage_name: str = 'snapshot-storage')[source]

Creates resources.json with snapshot-storage and jobs-storage set as folders directly under the workspace for the provided local_dir.

verify_cert(cert_to_be_verified, root_ca_public_key)[source]
verify_content(content, signature, public_key)[source]
verify_folder_signature(src_folder, root_ca_path)[source]