senko icon indicating copy to clipboard operation
senko copied to clipboard

OSError: only one active hash operation is permitted at a time

Open nznobody opened this issue 2 years ago • 0 comments

def _check_hash(self, x, y) should calculate sha one at a time to support certain implementations (Pycom MicroPython 1.20.3.b4 [v1.11-95ab8f63] on 2021-09-10; FiPy with ESP32)

https://github.com/RangerDigital/senko/blob/3e69507708cfe471cf40eaef479238fbdbbe4ea4/senko/senko.py#L26

Suggest simply doing them one after another:

        x_hash = sha(x.encode())
        x = x_hash.digest()
        y_hash = sha(y.encode())
        y = y_hash.digest()

nznobody avatar Jan 10 '22 04:01 nznobody