Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
DigestAlgorithm.inl
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4
5namespace Stroika::Foundation::Cryptography::Providers::OpenSSL {
6
7#if qStroika_HasComponent_OpenSSL
8
9 /*
10 ********************************************************************************
11 ***************************** OpenSSL::DigestAlgorithm *************************
12 ********************************************************************************
13 */
14 inline DigestAlgorithm::DigestAlgorithm (const DigestAlgorithm& src)
15 : DigestAlgorithm{src.fDigester_}
16 {
17 }
18 inline DigestAlgorithm& DigestAlgorithm::operator= (const DigestAlgorithm& src)
19 {
20 fDigester_ = src.fDigester_;
21 return *this;
22 }
23 inline DigestAlgorithm::operator const EVP_MD* () const
24 {
25 return fDigester_;
26 }
27 inline auto DigestAlgorithm::operator<=> (const DigestAlgorithm& rhs) const
28 {
29 return fDigester_ <=> rhs.fDigester_;
30 }
31 inline bool DigestAlgorithm::operator== (const DigestAlgorithm& rhs) const
32 {
33 return fDigester_ == rhs.fDigester_;
34 }
35 inline String DigestAlgorithm::ToString () const
36 {
37 return String{::EVP_MD_name (fDigester_)};
38 }
39#endif
40
41}