Line data Source code
1 : #pragma once 2 : 3 : #include <memory> 4 : 5 : namespace Envoy { 6 : namespace Common { 7 : namespace Crypto { 8 : 9 : class CryptoObject { 10 : public: 11 183 : virtual ~CryptoObject() = default; 12 : }; 13 : 14 : using CryptoObjectPtr = std::unique_ptr<CryptoObject>; 15 : 16 : namespace Access { 17 : 18 33 : template <class T> T* getTyped(CryptoObject& crypto) { return dynamic_cast<T*>(&crypto); } 19 : 20 : } // namespace Access 21 : 22 : } // namespace Crypto 23 : } // namespace Common 24 : } // namespace Envoy