2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "CryptoSession.h"
13 std::vector
<GET_CRYPTO_SESSION_INTERFACE_FN
> CCryptoSession::s_registeredInterfaces
;
15 void CCryptoSession::RegisterInterface(GET_CRYPTO_SESSION_INTERFACE_FN fn
)
17 s_registeredInterfaces
.push_back(fn
);
20 CCryptoSession
* CCryptoSession::GetCryptoSession(const std::string
& UUID
, const std::string
& cipherAlgo
, const std::string
& macAlgo
)
22 CCryptoSession
* retVal
= nullptr;
23 for (auto fn
: s_registeredInterfaces
)
24 if ((retVal
= fn(UUID
, cipherAlgo
, macAlgo
)))