![]() |
|
[Java] Creating a simple hashing program on Eclipse using Java - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Java] Creating a simple hashing program on Eclipse using Java (/showthread.php?tid=5346373) |
Creating a simple hashing program on Eclipse using Java - Sace - Jul 21, 2016 ![]() Can anyone guide me in the right direction so I can program this to hash the text? I'm completely new to programming, so any help would be massively appreciated. I've tried using guides online but they are too complex for the simple program I want to make * - Stealthâ„¢ - Jul 21, 2016 Do you want to actually learn Java or just have the program written for you? * - +Haze - Jul 21, 2016 First you'd want to figure out the hash algorithm you wish to use then find out how to do it in java. Then essentially you'd want to do something like this. Code String hashedValue = hashFunction(txtInput.getText());* - Sace - Jul 21, 2016 (Jul 21, 2016 10:50 AM)Stealthâ„¢ Wrote: Do you want to actually learn Java or just have the program written for you? I want to learn Java of course, just cant seem to understand how I go about doing this * - csrk - Jul 21, 2016 (Jul 21, 2016 10:57 AM)Sace Wrote: I want to learn Java of course, just cant seem to understand how I go about doing this Well, learning Java and learning how to hash properly are two different things. However, implementing a hashing function in java is an excellent way to learn. For the hasing function; you want a good spread of hashes; similar, but not identical values, should produce different hashes. Not just different but close ones. They should produce very different ones. As for how to implement it in java, check Haze+,s reply. You implement the hashing algorithm and call it. * - 192168 - Jul 21, 2016 Personally i think you should start by learning java * - Brendan - Jul 21, 2016 (Jul 21, 2016 12:51 PM)192168 Wrote: Personally i think you should start by learning java Best way to learn a language is to create an application. * - Sace - Jul 22, 2016 Thanks for the help guys ![]() I have a MD5 Example to the left, however it displays it through the console. How do I display the results on the output screen? Also, i'm unsure what parts of the example to change in order for it to work on the simple text part. * - _M5~ - Jul 25, 2016 (Jul 22, 2016 09:15 AM)Sace Wrote: Thanks for the help guys Using System.out.println(); always outputs the information to the console. In order to deliver the text to your GUI I'd suggest making an updating function to call within your mainframe. Just create a variable to hold the value of the String (instead of " HASH TO APPEAR HERE !! ") and update that variable within the hash example class. After creating the globally reachable variable, you'd call your update function in the frame (you'd call this function where you currently have System.out.println() ) which basically just resets the text to whatever the destination variable holds. |