diff options
author | Jack Lloyd <[email protected]> | 2021-04-03 15:55:37 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-04-03 16:25:44 -0400 |
commit | b1d7b48b39139bf691b27a1cfc3c5feb9fbe8f30 (patch) | |
tree | 91efb45012a4cab290d73feac6847e0df036911e /src/lib/hash/sha2_64/sha2_64.h | |
parent | d8ea823bf61af0bc9feb637afea8671c74c70e38 (diff) |
Add HashFunction::new_object
Diffstat (limited to 'src/lib/hash/sha2_64/sha2_64.h')
-rw-r--r-- | src/lib/hash/sha2_64/sha2_64.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/hash/sha2_64/sha2_64.h b/src/lib/hash/sha2_64/sha2_64.h index a3253e0e8..6036eb15c 100644 --- a/src/lib/hash/sha2_64/sha2_64.h +++ b/src/lib/hash/sha2_64/sha2_64.h @@ -20,7 +20,7 @@ class SHA_384 final : public MDx_HashFunction public: std::string name() const override { return "SHA-384"; } size_t output_length() const override { return 48; } - HashFunction* clone() const override { return new SHA_384; } + std::unique_ptr<HashFunction> new_object() const override { return std::make_unique<SHA_384>(); } std::unique_ptr<HashFunction> copy_state() const override; std::string provider() const override; @@ -43,7 +43,7 @@ class SHA_512 final : public MDx_HashFunction public: std::string name() const override { return "SHA-512"; } size_t output_length() const override { return 64; } - HashFunction* clone() const override { return new SHA_512; } + std::unique_ptr<HashFunction> new_object() const override { return std::make_unique<SHA_512>(); } std::unique_ptr<HashFunction> copy_state() const override; std::string provider() const override; @@ -81,7 +81,7 @@ class SHA_512_256 final : public MDx_HashFunction public: std::string name() const override { return "SHA-512-256"; } size_t output_length() const override { return 32; } - HashFunction* clone() const override { return new SHA_512_256; } + std::unique_ptr<HashFunction> new_object() const override { return std::make_unique<SHA_512_256>(); } std::unique_ptr<HashFunction> copy_state() const override; std::string provider() const override; |