Skip to content

Commit 472853f

Browse files
authored
{Spring} Use sha256 instead of md5 (#8638)
1 parent 1491b79 commit 472853f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/spring/azext_spring/migration/converter/base_converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _get_storage_unique_name(self, disk_props):
116116
mount_path = self._get_storage_mount_path(disk_props)
117117
access_mode = self._get_storage_access_mode(disk_props)
118118
storage_unique_name = f"{storage_name}|{account_name}|{share_name}|{mount_path}|{access_mode}"
119-
hash_value = hashlib.md5(storage_unique_name.encode()).hexdigest()[:16] # Take first 16 chars of hash
119+
hash_value = hashlib.sha256(storage_unique_name.encode()).hexdigest()[:16] # Take first 16 chars of hash
120120
result = f"{storage_name}{hash_value}".replace("-", "").replace("_", "")
121121
return result[:32] # Ensure total length is no more than 32
122122

0 commit comments

Comments
 (0)