Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Commit a64e99c

Browse files
authored
Merge pull request #155 from phil-zxx/FixArrayIndexBounds
Fixed Array Bounds for Fragment
2 parents 46d2d96 + a6622f7 commit a64e99c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iota/crypto/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,10 @@ def get_digest(self):
189189
sponge.absorb(key_fragment)
190190
sponge.squeeze(hash_trits)
191191

192-
fragment_start = i * FRAGMENT_LENGTH
193-
fragment_end = fragment_start + FRAGMENT_LENGTH
192+
fragment_hash_start = i * HASH_LENGTH
193+
fragment_hash_end = fragment_hash_start + HASH_LENGTH
194194

195-
digest[fragment_start:fragment_end] = hash_trits
195+
digest[fragment_hash_start:fragment_hash_end] = hash_trits
196196

197197
return Digest(TryteString.from_trits(digest), self.key_index)
198198

0 commit comments

Comments
 (0)