bkerler / opencl_brute

MD5,SHA1,SHA256,SHA512,HMAC,PBKDF2,SCrypt Bruteforcing tools using OpenCL (GPU, yay!) and Python
MIT License
163 stars 44 forks source link

need help understanding how to handle encoding. #13

Closed gngenius02 closed 3 years ago

gngenius02 commented 3 years ago

Hello,

wondering if you could by chance help guide me in the right direction. I am trying to use the hash_iterations_sha256 but I am failing to understand how to get the function to hexdigest each iteration before hashing it again. In my example. i am taking a string of b'abc'. and hashing it twice using the sha256 algo with the following results.

CL result: b'e72b2ecb885137b6989e7f95166408034ef9f50d2ae8642b92fcf743a5141d92' HASHLIB result: b'dfe7a23fefeea519e9bbfdd1a6be94c4b2e4529dd6b7cbea83f9959c2621b13c'

the one i actually need is the hashlib result. the only way i know to do that is to hexdigest the output or found that you can use the hexlify package. but I dont see how I would add that functionality to the CL version.

Any help would be appreciated and thanks for all the work you put into this project.