Skip to content

Commit

Permalink
Increase hash block size
Browse files Browse the repository at this point in the history
  • Loading branch information
negasora committed May 7, 2024
1 parent 2554c1b commit b5da4d5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions explorer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
from django.conf import settings
from django.core.cache import cache
from django.db import models
from django.db.models.signals import post_save
from django.db.models.constraints import UniqueConstraint, CheckConstraint
from django.dispatch import receiver
from django.forms import model_to_dict
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
Expand All @@ -24,7 +22,7 @@ def binary_upload_path(instance, filename):

def decompilation_upload_path(instance, filename):
ctx = hashlib.sha256()
for data in instance.decompiled_file.chunks(1024):
for data in instance.decompiled_file.chunks(8192):
ctx.update(data)
return f"{settings.UPLOAD_DECOMPILED_PATH}/{ctx.hexdigest()}"

Expand Down

0 comments on commit b5da4d5

Please sign in to comment.