SHA256 How to get digest value in `unsigned char` format?
#2
I think it makes sense to explain the problem with some exampes too.

just an example, maybe not applicable to your problem at all:
"I want to convert 0x01020304 to 0x04030201"

"I want to convert raw/binary data \x65\x66\x67\x68 to hexadecimal characters 65666768"

This "Byte" type from lzma does nothing special, it's just a custom variable type in the lzma code.

it's actually more clever to just try to understand the problem and see what is "wrong" and fix it.
Maybe your input is different etc. You should defintely show us some data too, e.g. I got this xyz, but want to have this instead: abc

btw: we normally do not use "int" array type but u32 arrays instead (in theory also unsigned char should work, but in hashcat we normally just use the unsigned u32 type instead)

note2: what I totally forgot to mention, but I already saw it before... you are calling sha1 but your function says sha256 ("ocl_sha256"). this is very, very weird . Maybe this is the main reason for the confusion/wrong results ?
Reply


Messages In This Thread
RE: SHA1 How to get digest value in `Byte` format? - by philsmd - 03-30-2019, 10:00 AM