The "password_hash" Module (v3)

Description

This module allows passwords to be hashed and adds the /MKPASSWD command which allows the generation of hashed passwords for use in the server configuration.

Configuration

To load this module use the following <module> tag:

<module name="password_hash">

<mkpasswd>

The <mkpasswd> tag defines settings about how the mkpasswd module should behave. This tag can only be defined once.

Name Type Default Value Description
operonly Boolean No Whether the /MKPASSWD command is only usable by server operators. You should enable this once you have generated your passwords.
Example Usage
<mkpasswd operonly="no">

Commands

Name Parameter Count Syntax Description
MKPASSWD 2 <hash> <password> Hashes <password> using the <hash> algorithm.

The following hashing modules are included with InspIRCd:

Algorithm Module(s) Description
argon2d argon2 Hashes using the Argon2d algorithm.
argon2i argon2 Hashes using the Argon2i algorithm.
argon2id argon2 Hashes using the Argon2id algorithm.
bcrypt bcrypt Hashes using the bcrypt algorithm.
hmac-md5 password_hash, md5 Hashes using the MD5 and HMAC algorithms.
hmac-sha1 password_hash, sha1 Hashes using the SHA-1 and HMAC algorithms.
hmac-sha256 password_hash, sha256 Hashes using the SHA-256 and HMAC algorithms.
md5 md5 Hashes using the MD5 algorithm.
pbkdf2-hmac-md5 pbkdf2, md5 Hashes using the MD5 and PBKDF2 algorithms.
pbkdf2-hmac-sha1 pbkdf2, sha1 Hashes using the SHA-1 and PBKDF2 algorithms.
pbkdf2-hmac-sha256 pbkdf2, sha256 Hashes using the SHA-256 and PBKDF2 algorithms.
sha1 sha1 Hashes using the SHA-1 algorithm.
sha256 sha256 Hashes using the SHA-256 algorithm.

Example Usage

Hashes the password "hunter2" using the HMAC-SHA-256 algorithm:

/MKPASSWD hmac-sha256 hunter2

Special Notes

You should only run this command on a server that you trust as the plaintext password may be intercepted by an attacker.