Jul 21, 2016 10:49 AM
(This post was last modified: Jul 21, 2016 10:49 AM by Sace.)
|
Java
Creating a simple hashing program on Eclipse using Java |
|
Jul 21, 2016 10:54 AM
(This post was last modified: Jul 21, 2016 10:57 AM by +Haze.)
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());(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
Jul 21, 2016 12:18 PM
(This post was last modified: Jul 21, 2016 12:19 PM by csrk.)
(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. (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. ![]() (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. |
|
|


![[Image: hashing_screen.png]](https://s32.postimg.org/xibfavun5/hashing_screen.png)

![[Image: LZt9758.gif]](https://i.imgur.com/LZt9758.gif)
![[Image: hasher1.png]](https://s32.postimg.org/jmkwu4mg1/hasher1.png)