Skip to content

Commit 507c8a5

Browse files
minor formatting
1 parent 24f1978 commit 507c8a5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datajoint/hash.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def to_ascii(byte_string):
2222

2323
def long_hash(*buffers):
2424
"""
25-
:param buffer: a binary buffer (e.g. serialized blob)
25+
:param buffers: any number of binary buffers (e.g. serialized blobs)
2626
:return: 43-character base64 ASCII rendition SHA-256
2727
"""
2828
hashed = hashlib.sha256()
@@ -33,11 +33,10 @@ def long_hash(*buffers):
3333

3434
def short_hash(*buffers):
3535
"""
36-
:param buffer: a binary buffer (e.g. serialized blob)
36+
:param buffers: any number of binary buffers (e.g. serialized blobs)
3737
:return: the first 8 characters of base64 ASCII rendition SHA-1
3838
"""
3939
hashed = hashlib.sha1()
4040
for buffer in buffers:
4141
hashed.update(buffer)
4242
return to_ascii(hashed.digest())[:8]
43-

0 commit comments

Comments
 (0)