Sitemap
Techwin Cyber

Techwin Cyber

After many career choices I have finally taken the leap into Cyber Security. Join me on my journey and see what I learn, make with code and more!

Hashing

3 min readJan 8, 2026
Press enter or click to view image in full size

As promised, I have a little insight to Hashing. This is the Integrity part of the CIA Triad, all about keeping the accuracy of the information. A simple thing you can try out for yourself, so follow along.

First, you will need access to a text editor like notepad and and a command interface, PowerShell. This was done on a windows computer but also works on MAC with the same code. Open notepad or a text editor of your choice, write ‘Hi my name is NAME.’ dont worry, you can use any name you want. Now save that file either on your desktop or in your documents, but remember where you save it, and call it ‘test’ without the quotes. Also remember the file type, if using notepad then it should be ‘.txt’.

Get Techwin Cyber’s stories in your inbox

Join Medium for free to get updates from this writer.

Now we get to the good bit, open PowerShell and you will see the command line that starts something like ‘PS C:\Users\username>’. If that is right then this is easy, type the following without quotes before Get and after MD5 ‘Get-FileHash -Path ‘Documents/test.txt’ -Algorithm MD5' now press enter. If you have something different showing than C:\Users… then right click the file and select properties and select Details, copy the folder path and paste it into the path section of the code within the quotes and add test.txt at the end as this is the file we are hashing.

Now you should have the MD5 Algorithm, the Hash and the path showing. You can do this over and over again and it will give the same hash value, however, keeping that PowerShell window open, open that test file again as normal and change any character you want or add a letter, number, symbol to the end or place it anywhere in that file even change the name to something else. Remember the change you made, we need to change it back later. Now save the file and go back to PowerShell, now to save typing it out again, just press the up arrow on your keyboard, the same line of code will appear again, just press enter. Now we can see the hash value has changed, this means that the original information in the file was changed/tampered with.

Last thing to do now, go back to your file and undo that change you made, now save it and go back to PowerShell, press up arrow and now look at the hash, it is identical to the first one, this now means the information is accurate, it is original as you made it for a start. Have a play around with it, it will even change if you place a white coloured full stop somewhere in a word document, you can’t see the change but the Algorithm did and lets you know in the Hash. In my example below I added a blank space at the end.

Have fun and give it a go! There will be lots more things to try out for yourself in the near future.

Press enter or click to view image in full size

--

--

Techwin Cyber
Techwin Cyber

Written by Techwin Cyber

0 followers

After many career choices I have finally taken the leap into Cyber Security. Join me on my journey and see what I learn, make with code and more!