Closed IsaacDynamo closed 7 months ago
Multiple calls to digest() don't return the same answers.
digest()
>>> import crc >>> r = crc.Register(crc.Crc8.BLUETOOTH) >>> r.init() >>> r.update(b"Hello World!") 138 >>> r.digest() 81 >>> r.digest() 138 >>> r.digest() 81
Expected multiple calls to digest() to return the same value.
Return value flip-flops between two values.
I think it is caused by in-place reverse in digest(), L256-L257
Hi @IsaacDynamo,
nice find 👍! Root cause also seems to be spot on. Thanks for reporting this ❤️, I'll try to address this and provide a release as soon as possible.
Root cause
best Nico
https://github.com/Nicoretti/crc/releases/tag/6.1.2
Summary
Multiple calls to
digest()
don't return the same answers.Reproducing the Issue
Expected Behaviour
Expected multiple calls to
digest()
to return the same value.Actual Behaviour
Return value flip-flops between two values.
Root Cause (optional)
I think it is caused by in-place reverse in
digest()
, L256-L257