From 3dbb43e18812a6f27e9446f0151727396ffd6ce2 Mon Sep 17 00:00:00 2001 From: Simon Chuu Date: Mon, 18 May 2020 22:59:05 -0400 Subject: [PATCH] plugins/postfixadmin-change-password: Add "ARGON2I" My mail server was set up with `dovecot:ARGON2I` password encryption option. This allows people who set up argon2i as the encryption method to continue using it when users change their password with the plugin. --- .../ChangePasswordPostfixAdminDriver.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/postfixadmin-change-password/ChangePasswordPostfixAdminDriver.php b/plugins/postfixadmin-change-password/ChangePasswordPostfixAdminDriver.php index 00f1d78c5..384c1c996 100755 --- a/plugins/postfixadmin-change-password/ChangePasswordPostfixAdminDriver.php +++ b/plugins/postfixadmin-change-password/ChangePasswordPostfixAdminDriver.php @@ -319,6 +319,10 @@ class ChangePasswordPostfixAdminDriver implements \RainLoop\Providers\ChangePass case 'sha512-crypt': $sResult = '{SHA512-CRYPT}' . crypt($sPassword,'$6$'.$sSalt); break; + + case 'argon2i': + $sResult = '{ARGON2I}' . password_hash($sPassword, PASSWORD_ARGON2I); + break; case 'mysql_encrypt': if($this->sEngine == 'MySQL'){