ptth/bare_minimum_crypto/cpp/sodium_helpers.cpp

12 lines
205 B
C++
Raw Normal View History

#include "sodium_helpers.h"
#include <stdexcept>
namespace BareMinimumCrypto {
void try_sodium_init () {
if (sodium_init () < 0) {
throw std::runtime_error ("Can't initialize libsodium");
}
}
}