File tree 1 file changed +2
-4
lines changed
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,7 @@ def lockdown_sha1(*data):
30
30
XSha1: a0db6e70616033a7b5fdda37cee2d43f2da10288
31
31
LSha1: a868fb6c0d95c48d037e9f08ce6e4200fd435fa4
32
32
33
- Unlike some implementations of this hash, this one will not modify the buffer when calling digest(),
34
- so it is a safe operation. You can optionally pass finalize=True to the digest() call to override
35
- this behavior.
33
+ Unlike some implementations of this hash, this one will not modify the object state when calling digest().
36
34
"""
37
35
38
36
@@ -59,7 +57,7 @@ def debug(self):
59
57
def digest (self ):
60
58
state = array .array ('L' , self ._state )
61
59
62
- if len ( self ._buffer ) > 0 :
60
+ if self ._position > 0 :
63
61
# There is uncommitted data, process it.
64
62
block = bytearray (self ._buffer )
65
63
position = self ._position
You can’t perform that action at this time.
0 commit comments