How to perform SHA3 sum of your string in Node.js, Ruby and Bash.

Node.js

Assuming you already have npm installed in your Ubuntu 20.04. You’ll need to install SHA3 package with the following command.

Once completed, create a file named sha3sum.js and copy the contents below into the file.

Now to test if the sha3sum.js file is working. The sha3sum.js is currently configured with 224 bits, it can be replaced with 256, 384 or 512.

If it ran successfully, you should see the same output.

Bash in Ubuntu 20.04

SHA3 sum is not installed by default. To install, run the following command.

To perform a SHA3 sum, run the following command. To run the SHA3 sum with other bit length, replace 224 in the command with 256, 384 or 512.

You should see the same output as below if it ran successfully.

Ruby

To install SHA3 sum in Ruby, run the following command.

Once completed, create a file sha3sum.rb and copy the contents below into the file.

To test if the file is working, run the following command.

You should see the same output as below if it ran successfully.

< Back to all the stories I had written

A software engineer, a rock climbing, diving & inline skating enthusiast, a husband, a father.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store