Closed LeMoussel closed 5 years ago
Hi, I got this error: pwArray.extend(pw) TypeError: an integer is required in opencl.py. To correct, at line 185 I did this : pwArray.extend(pw.encode('utf-8'))
pwArray.extend(pw) TypeError: an integer is required
pwArray.extend(pw.encode('utf-8'))
for example for SHA256 hash
pw = 'TEST' # In loop pwArray.extend([0] * (inBufSize_bytes - pwLen)) => len(pwArray) = 132 => pwArray: bytearray(b'\x04\x00\x00\x00TEST\x00\x00\x00\x00\x00..... # After loop pwArray = np.frombuffer(pwArray, dtype=np.uint32) => len(pwArray) = 33 => pwArray: [ 4 1414743380 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
As it says. you need to convert it to integer, not to ascii or bytes :) See test.py for correct implementation details.
Hi, I got this error:
pwArray.extend(pw) TypeError: an integer is required
in opencl.py. To correct, at line 185 I did this :pwArray.extend(pw.encode('utf-8'))
for example for SHA256 hash