Skip to content

Commit

Permalink
Changed hashing algorithm for docids in bridged apps
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Oct 26, 2021
1 parent 62acf9c commit 141840c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def isextsupported(fileext):

def _gendocid(wopisrc):
'''Generate a URL safe hash of the wopisrc to be used as document id by the app'''
dig = hmac.new(WB.hashsecret.encode(), msg=wopisrc.split('/')[-1].encode(), digestmod=hashlib.sha1).digest()
dig = hmac.new(WB.hashsecret.encode(), msg=wopisrc.split('/')[-1].encode(), digestmod=hashlib.blake2b).digest()
return urlsafe_b64encode(dig).decode()[:-1]


Expand Down

0 comments on commit 141840c

Please sign in to comment.