Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/backends/nntpchan-daemon/libnntpchan/crypto.cpp

21 lines
287 B
C++
Raw Normal View History

2016-10-15 21:37:59 +05:00
#include "crypto.hpp"
2017-05-03 20:37:09 +05:00
#include <sodium.h>
#include <cassert>
2016-10-15 21:37:59 +05:00
namespace nntpchan
{
void SHA512(const uint8_t * d, const std::size_t l, SHA512Digest & h)
{
crypto_hash(h.data(), d, l);
}
2017-05-03 20:37:09 +05:00
Crypto::Crypto()
{
assert(sodium_init() == 0);
}
Crypto::~Crypto()
{
}
2016-10-15 21:37:59 +05:00
}