14 lines
226 B
C++
14 lines
226 B
C++
|
#include "sodium_helpers.h"
|
||
|
|
||
|
#include <stdexcept>
|
||
|
|
||
|
#include <sodium.h>
|
||
|
|
||
|
namespace BareMinimumCrypto {
|
||
|
void try_sodium_init () {
|
||
|
if (sodium_init () < 0) {
|
||
|
throw std::runtime_error ("Can't initialize libsodium");
|
||
|
}
|
||
|
}
|
||
|
}
|