File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def to_ascii(byte_string):
2222
2323def 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
3434def 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-
You can’t perform that action at this time.
0 commit comments