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

Commit

Permalink
Merge pull request #155 from phil-zxx/FixArrayIndexBounds
Browse files Browse the repository at this point in the history
Fixed Array Bounds for Fragment
  • Loading branch information
todofixthis committed Feb 24, 2018
2 parents 46d2d96 + a6622f7 commit a64e99c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iota/crypto/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ def get_digest(self):
sponge.absorb(key_fragment)
sponge.squeeze(hash_trits)

fragment_start = i * FRAGMENT_LENGTH
fragment_end = fragment_start + FRAGMENT_LENGTH
fragment_hash_start = i * HASH_LENGTH
fragment_hash_end = fragment_hash_start + HASH_LENGTH

digest[fragment_start:fragment_end] = hash_trits
digest[fragment_hash_start:fragment_hash_end] = hash_trits

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

Expand Down

0 comments on commit a64e99c

Please sign in to comment.