# gtkhash for Hashing Files from a GUI

(and introduction to hashing)

Since this is the beginning page in the hashing section, I will explain the concept of hashing here, what is it, what it does, why it's useful, how to use it. This should be quite a small introduction as most of gtkhash is very self-explanatory and you can figure everything out yourself just by clicking around if you really wanted to. Personally, I like the GUI sometimes, it's not too complex, you don't have to have the manual up side-by-side with another terminal tab while trying to do something, and while it's not typically as fast as a cli program in terms of use and output, it's still nice to know how to use.

### What you need to know (To get the most out of this!)

— A tiny bit of familiarity with the terminal.. But don't worry! It's just for installing gtkhash. (you could just use your GUI software installer to install it instead if you really do not like the terminal.) — Some determination to read, mentally digest, practice, and learn for yourself. That's it.. Really.

### What this page covers (To Not Waste Your Time!)

— Quick introduction to hashing (what is it, why it's useful.) — Installing gtkhash — Using gtkhash — Using different hashing algorithms in gtkhash — Saving hash output to a file using gtkhash — The different view modes of gtkhash — Closing notes

### A Quick Introduction to Hashing (The What, and the why!)

#### The What!

Let's start with the what. What is hashing? From the way I learned it, hashing is the process of taking some input data, running it through a mathematical algorithm, which then spits out a unique alphanumerical string called a hash. Hashing is designed to be only one way and ""Hopefully!"" not reversible through brute force. So when all is right in the world for a hashing algorithm, a string of data has only one equivalent hash, and the original string can not be derived from the hash.

#### The Why!

Why do we need hashing? Well, hashing is useful because with it, you can verify that the integrity of data remains the same, it can increase the security of a password database for example, because all the server needs to do is compare the hash output with the password received instead of comparing strings directly, and it can provide checksums from developers for things like your web browser. Without hashing, data could be modified by anything from another person, to passing electrons or cosmic mysteries without any real way to tell that something has happened!

### Installing gtkhash

To install gtkhash, you can either install it using your fancy GUI Linux software store for your specific distribution (synaptic maybe?) or just install it by opening that big scary terminal and typing the following if you're using a debian-based distribution.

    sudo apt install gtkhash

To use gtkhash, you can either open it up from your extra extra fancy start menu, or open that scary terminal up again (I know, it'll be the last time for this section, I swear.) And type the following command:

    gtkhash &

Then run:

    disown -r

this command should run gtkhash as it's own process not directly attached to the terminal, you should then be able to close the terminal and gtkhash stays open... I hope. If not then you'll have to figure out a solution on your own.

### Using gtkhash

To use gtkhash, it's pretty simple, upon launching the program you will be greeted with a file box to select a file, a box to check a file against a checksum file or data from a checksum file, and the remaining boxes for the output of the different hashing algorithms. All you need to do is make a file (or pull one from a location in your file-system like /bin) and then click "hash" in the bottom right, which should spit out the hashes for MD5, SHA1, SHA256, and CRC32 by default.

### Using different hashing algorithms in gtkhash

I'll be honest, the default 4 hashing algorithms you get will probably be all you need for the rest of time, but let's say you for some reason really need a hash using the GOST algorithm for example, well head over to that tab labeled "edit" in the top left of the gtkhash window and go down to the "preferences". From there you will be quickly overwhelmed with the 7 billion hash functions, just pick the ones you want by clicking the boxes and it will be added to where those original default 4 algorithms were in gtkhash, and if you specifically hate those 4 default ones, you can remove them the same way.

### Saving the output from gtkhash to a text file

To save the results of your epic hashing session, head over to the top left of the gtkhash window and click "file", and the go to "save digest file", from there you will be able to name the hash file. What I would recommend is to save the file with the same name as the original file you hashed, and then with the appropriate extension (.sha1, .md5, .sha256, whatever) so if you hashed the file Timothys_Starbucks_Order.txt using sha1, you would save it as Timothys_Starbucks_Order.sha1, this stops gtkhash from getting confused and it should put the hash in the check box like it's supposed to.

### Using the different View Modes of gtkhash

In gtkhash, there are multiple different view modes that you can use which allow you to do different things like instead of hashing a file, you can hash the word "test" for example, and instead of hashing a single file, you can hash multiple files! You can do this by clicking the "view" tab, selecting whatever mode you want, and then do what you need with it.

#### Conclusion

gtkhash is a nifty piece of software that you can use without knowledge of the terminal to create digests of files. What I didn't show was the ability to use gtkhash as an extension in your file manager, for example nautilus, but there's probably a guide somewhere on the internet if you're looking for that specifically. If you want to check to see if gtkhash has an addon for your specific file manager, you can use synaptic and search gtkhash to get the list of addons for whatever file manager they support, but they support most of the big ones and I added the package names so all you would need to do is sudo apt install it. thunar (thunar-gtkhash), nemo (nemo-gtkhash), nautilus (nautilus-gtkhash), caja (caja-gtkhash). Just install the package name in parentheses and it should work without a problem.

That's all, we're using the terminal next do to the same thing!