mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
LibCrypto: Add method to copy Crypto::Hash::Manager
This commit is contained in:
parent
f34da6396f
commit
0db6e0449e
1 changed files with 9 additions and 0 deletions
|
@ -215,6 +215,15 @@ public:
|
|||
return m_kind == kind;
|
||||
}
|
||||
|
||||
inline Manager copy() const
|
||||
{
|
||||
Manager result;
|
||||
result.m_algorithm = m_algorithm;
|
||||
result.m_kind = m_kind;
|
||||
result.m_pre_init_buffer = m_pre_init_buffer;
|
||||
return result;
|
||||
}
|
||||
|
||||
private:
|
||||
using AlgorithmVariant = Variant<Empty, BLAKE2b, MD5, SHA1, SHA256, SHA384, SHA512>;
|
||||
AlgorithmVariant m_algorithm {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue