diff options
| author | 2026-03-28 21:32:23 +0000 | |
|---|---|---|
| committer | 2026-03-29 00:42:15 +0000 | |
| commit | cbc5431d62e3fe9166f18395dce3ddf2af0906d3 (patch) | |
| tree | 48a87fc27dc4826ce0caf4071e2060a9ff9e24c5 /modules/hash_sha2.cpp | |
| parent | Move service code from base to its own header. (diff) | |
Switch modules from reference<> to shared_ptr<> and weak_ptr<>.
Diffstat (limited to 'modules/hash_sha2.cpp')
| -rw-r--r-- | modules/hash_sha2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/hash_sha2.cpp b/modules/hash_sha2.cpp index 6ec7efdc4..38baff454 100644 --- a/modules/hash_sha2.cpp +++ b/modules/hash_sha2.cpp @@ -74,7 +74,7 @@ private: Hash::HMACProvider hmacsha2algo; public: - SHA2Provider(Module* mod, const std::string& algorithm, size_t ds, size_t bs) + SHA2Provider(const WeakModulePtr& mod, const std::string& algorithm, size_t ds, size_t bs) : Hash::Provider(mod, algorithm, ds, bs) , hmacsha2algo(mod, algorithm) { @@ -106,10 +106,10 @@ private: public: ModuleHashSHA2() : Module(VF_VENDOR, "Allows other modules to generate SHA-2 hashes.") - , sha224algo(this, "sha224", SHA224_DIGEST_SIZE, SHA224_BLOCK_SIZE) - , sha256algo(this, "sha256", SHA256_DIGEST_SIZE, SHA256_BLOCK_SIZE) - , sha384algo(this, "sha384", SHA384_DIGEST_SIZE, SHA384_BLOCK_SIZE) - , sha512algo(this, "sha512", SHA512_DIGEST_SIZE, SHA512_BLOCK_SIZE) + , sha224algo(weak_from_this(), "sha224", SHA224_DIGEST_SIZE, SHA224_BLOCK_SIZE) + , sha256algo(weak_from_this(), "sha256", SHA256_DIGEST_SIZE, SHA256_BLOCK_SIZE) + , sha384algo(weak_from_this(), "sha384", SHA384_DIGEST_SIZE, SHA384_BLOCK_SIZE) + , sha512algo(weak_from_this(), "sha512", SHA512_DIGEST_SIZE, SHA512_BLOCK_SIZE) { } |
