From 94ada5969bd62abe42b4bd70f02c40160223b980 Mon Sep 17 00:00:00 2001 From: Minh141120 Date: Thu, 10 Jul 2025 15:05:51 +0700 Subject: [PATCH] refactor: deprecate electron-checksum.py script --- .github/scripts/electron-checksum.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 .github/scripts/electron-checksum.py diff --git a/.github/scripts/electron-checksum.py b/.github/scripts/electron-checksum.py deleted file mode 100644 index fba4ff609..000000000 --- a/.github/scripts/electron-checksum.py +++ /dev/null @@ -1,28 +0,0 @@ -import hashlib -import base64 -import sys - -def hash_file(file_path): - # Create a SHA-512 hash object - sha512 = hashlib.sha512() - - # Read and update the hash object with the content of the file - with open(file_path, 'rb') as f: - while True: - data = f.read(1024 * 1024) # Read in 1 MB chunks - if not data: - break - sha512.update(data) - - # Obtain the hash result and encode it in base64 - hash_base64 = base64.b64encode(sha512.digest()).decode('utf-8') - return hash_base64 - -if __name__ == "__main__": - if len(sys.argv) < 2: - print("Usage: python3 script.py ") - sys.exit(1) - - file_path = sys.argv[1] - hash_base64_output = hash_file(file_path) - print(hash_base64_output)