Let's say the output of a sha256 hash function encoded to base64 is "ypeBEsobvcr6wjGzmiPcTaeG7/gUfE5yuYB3ha/uSLs". Since the output is produced from sha256 hash function it is 256bits long. But how can i find out from the string output "ypeBEsobvcr6wjGzmiPcTaeG7/gUfE5yuYB3ha/uSLs" the corresponding bits?
Asked
Active
Viewed 334 times
0
-
Decode it from base64 and then read the bytes one by one and mask them? I'm not sure what the goal here is. Are you trying to reverse the hash (not possible in the general case), or just reformat the hash to see it bit by bit (which is what my first sentence refers to)? – ShadowRanger Nov 30 '18 at 14:39
-
@ShadowRanger. Thanks for the response. I want to reformat the hash to see it by bits. So this string of bits is unique for a given input right? I mean since it is derived from the base64 output we can not have a collision, it is just a reformat right? Can you please provide a way of how to convert the base64 to string? i searched for decoder from base 64 and i was not able to convert it. – kathi Nov 30 '18 at 14:44
-
If it's just reformatting the hash (not trying to recover the original data, which you either have, or you don't), you'd need to be more specific as to the language; decoding base64 to bytes and converting bytes to bits is language dependent. – ShadowRanger Nov 30 '18 at 14:46
-
@ShadowRanger thank you! i convert it online and found out the bits. – kathi Nov 30 '18 at 14:56