From 07bd1bbec968931a12d2dc818383ce5115146e97 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 14 Apr 2025 01:01:24 +0100 Subject: [PATCH] Switch enc_sha2 default from sha256 to sha512. --- data/anope.example.conf | 4 ++-- modules/encryption/enc_sha2.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/anope.example.conf b/data/anope.example.conf index 0e8591315..4474b3175 100644 --- a/data/anope.example.conf +++ b/data/anope.example.conf @@ -1280,9 +1280,9 @@ module name = "enc_sha2" /** The sub-algorithm to use. Can be set to sha224 for SHA-224, sha256 for - * SHA-256, sha384 for SHA-384, or sha512 for SHA-512. Defaults to sha256. + * SHA-256, sha384 for SHA-384, or sha512 for SHA-512. Defaults to sha512. */ - #algorithm = "sha256" + #algorithm = "sha512" } /* diff --git a/modules/encryption/enc_sha2.cpp b/modules/encryption/enc_sha2.cpp index 4e60d330d..6f7a2b7cb 100644 --- a/modules/encryption/enc_sha2.cpp +++ b/modules/encryption/enc_sha2.cpp @@ -128,7 +128,7 @@ public: void OnReload(Configuration::Conf &conf) override { - this->defaultprovider = GetAlgorithm(Config->GetModule(this).Get("algorithm", "sha256")); + this->defaultprovider = GetAlgorithm(Config->GetModule(this).Get("algorithm", "sha512")); } EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) override