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

Commit db13509

Browse files
committed
Fixed Array Bounds for Fragment
Fixed array bound from FRAGMENT_LENGTH (which is 2187 in trytes) to HASH_LENGTH (which is 243 in trits).
1 parent 540668b commit db13509

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

iota/crypto/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ 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_start = i * HASH_LENGTH
193+
fragment_end = fragment_start + HASH_LENGTH
194194

195195
digest[fragment_start:fragment_end] = hash_trits
196196

0 commit comments

Comments
 (0)