mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-19 01:08:18 +03:00
LibCrypto: Add method to copy Crypto::Hash::Manager
This commit is contained in:
parent
f34da6396f
commit
0db6e0449e
Notes:
sideshowbarker
2024-07-17 09:49:33 +09:00
Author: https://github.com/msvisser Commit: https://github.com/SerenityOS/serenity/commit/0db6e0449e Pull-request: https://github.com/SerenityOS/serenity/pull/22053
@ -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…
Reference in New Issue
Block a user