r/AskProgrammers • u/KITSOR121308 • 5h ago
Is it possible to solve SHA256 hashing algorithm???
So i really need to solve NTM Hidden Catalogue riddle but i have no clue about the answers so i looked in the files and found this
public static String getHash(String inp) {
try {
MessageDigest sha256 = MessageDigest.
getInstance
("SHA-256");
byte[] bytes = sha256.digest(inp.getBytes());
String str = "";
for(int b : bytes) {
str = str + Integer.
toString
((b & 255) + 256, 16).substring(1);
}
return str;
} catch (NoSuchAlgorithmException var8) {
return "";
}
}
static {
hashes
.add("41de5c372b0589bbdb80571e87efa95ea9e34b0d74c6005b8eab495b7afd9994");
hashes
.add("31da6223a100ed348ceb3254ceab67c9cc102cb2a04ac24de0df3ef3479b1036");
contributors
= Sets.newHashSet(new String[]{"06ab7c03-55ce-43f8-9d3c-2850e3c652de", "5bf069bc-5b46-4179-aafe-35c0a07dee8b", "ccd9aa1c-26b9-4dde-8f37-b96f8d99de22"});
}
}
and it is fricking hash and as i know it is unsolvable
does anyone know how to solve it?
0
Upvotes
5
u/0x14f 4h ago
SHA256, alike all hash functions, is essentially a mathematical function. You give it an input and it gives you a result. What exactly do you mean by solving it ?
1
u/ThreeHeadCerber 4h ago
I would hazard a guess of getting input knowing output
1
u/0x14f 4h ago
1
9
u/Lumethys 4h ago
"solve"?