How To Install mhash on CentOS 7

In this tutorial we learn how to install mhash on CentOS 7. mhash is Thread-safe hash algorithms library

Introduction

In this tutorial we learn how to install mhash on CentOS 7.

What is mhash

Mhash is a free library which provides a uniform interface to a large number of hash algorithms. These algorithms can be used to compute checksums, message digests, and other signatures. The HMAC support implements the basics for message authentication, following RFC 2104. In the later versions some key generation algorithms, which use hash algorithms, have been added. Currently, the library supports the algorithms HAVAL128, MD5, MD4, MD2, RIPEMD128/160/256/320, TIGER, TIGER160, TIGER128, SHA1/224/256/384/512, Whirlpool, SNEFRU128/256, CRC32B and CRC32 checksums.

We can use yum or dnf to install mhash on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install mhash.

Install mhash on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install mhash using yum by running the following command:

sudo yum -y install mhash

Install mhash on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install mhash using dnf by running the following command:

sudo dnf -y install mhash

How To Uninstall mhash on CentOS 7

To uninstall only the mhash package we can use the following command:

sudo dnf remove mhash

References

Summary

In this tutorial we learn how to install mhash on CentOS 7 using yum and dnf.