encode bla...
This commit is contained in:
parent
3dcd65d7de
commit
c7cfe9f719
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ def gastropin(request):
|
||||||
def calculate_gastro_hash(pin):
|
def calculate_gastro_hash(pin):
|
||||||
key = settings.CBASE_GASTRO_KEY
|
key = settings.CBASE_GASTRO_KEY
|
||||||
bla = '%s%s' % (key, pin)
|
bla = '%s%s' % (key, pin)
|
||||||
return hashlib.sha256(bla).hexdigest()
|
return hashlib.sha256(bla.encode()).hexdigest()
|
||||||
|
|
||||||
return set_hash_field(request, GastroPinForm,
|
return set_hash_field(request, GastroPinForm,
|
||||||
'gastropin1', 'gastroPIN', calculate_gastro_hash, 'gastropin.html')
|
'gastropin1', 'gastroPIN', calculate_gastro_hash, 'gastropin.html')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue