lib/gcrypt/MD5: add wrapper in lib/crypto/

Prepare for using other crypto libraries, e.g. FFmpeg's libavutil.
This commit is contained in:
Max Kellermann
2019-08-13 17:20:07 +02:00
parent 2c2efaa91f
commit d515a8e99a
9 changed files with 136 additions and 17 deletions

View File

@@ -18,7 +18,7 @@
*/
#include "QobuzClient.hxx"
#include "lib/gcrypt/MD5.hxx"
#include "lib/crypto/MD5.hxx"
#include "util/ConstBuffer.hxx"
#include <stdexcept>

View File

@@ -27,7 +27,7 @@
#include "input/FailingInputStream.hxx"
#include "input/InputPlugin.hxx"
#include "config/Block.hxx"
#include "lib/gcrypt/Init.hxx"
#include "lib/crypto/MD5.hxx"
#include "thread/Mutex.hxx"
#include "util/StringCompare.hxx"
@@ -123,7 +123,7 @@ QobuzInputStream::OnQobuzTrackError(std::exception_ptr e) noexcept
static void
InitQobuzInput(EventLoop &event_loop, const ConfigBlock &block)
{
Gcrypt::Init();
GlobalInitMD5();
const char *base_url = block.GetBlockValue("base_url",
"http://www.qobuz.com/api.json/0.2/");

View File

@@ -42,7 +42,7 @@ qobuz_feature = get_option('qobuz')
if qobuz_feature.disabled()
enable_qobuz = false
else
enable_qobuz = curl_dep.found() and yajl_dep.found() and gcrypt_dep.found()
enable_qobuz = curl_dep.found() and yajl_dep.found() and crypto_md5_dep.found()
if not enable_qobuz and qobuz_feature.enabled()
error('Qobuz requires CURL, libyajl and libgcrypt')
endif
@@ -93,7 +93,7 @@ input_plugins = static_library(
nfs_dep,
smbclient_dep,
yajl_dep,
gcrypt_dep,
crypto_md5_dep,
],
)