2025-06-25 21:34:25 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2025-06-25 21:28:54 +00:00
|
|
|
# Duplicate Check
|
2025-06-25 21:43:39 +00:00
|
|
|
# Version: 0.10.0
|
2025-06-25 21:28:54 +00:00
|
|
|
|
2025-06-25 21:30:25 +00:00
|
|
|
# Copyright 2025 Jake Winters
|
2025-06-25 21:36:04 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
2025-06-25 21:37:13 +00:00
|
|
|
import hashlib
|
2025-06-25 21:43:39 +00:00
|
|
|
import argparse
|
2025-06-25 21:38:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
def hash_file(file_path):
|
|
|
|
sha256_hash = hashlib.sha256()
|
|
|
|
with open(file_path, 'rb') as f:
|
|
|
|
for byte_block in iter(lambda: f.read(65536), b''):
|
|
|
|
sha256_hash.update(byte_block)
|
2025-06-25 21:43:39 +00:00
|
|
|
return sha256_hash.hexdigest()
|