How to perform MD5 sum of your string in Node.js, Ruby, Bash, CSharp/C# and Go/Golang.

Node.js

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

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

Now to test if the md5sum.js file is working.

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

Bash in Ubuntu 20.04

MD5 sum is installed by default. To perform a MD5 sum, run the following command.

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

Ruby

The digest gem is included in Ruby therefore no installation necessary. Create a file md5sum.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.

Go/Golang

The imported package are all part of Go/Golang default installation. No additional package install with “go get” necessary. Create a file “md5sum.go” 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.

CSharp/C#

You’ll need to import these 2 libraries.

Function below will produce md5sum of the input string

< 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