mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-16 00:12:43 +00:00
6b4ffcff5a
Signed-off-by: R4SAS <r4sas@i2pmail.org>
26 lines
395 B
C++
26 lines
395 B
C++
/**
|
|
* This code is licensed under the MCGSI Public License
|
|
* Copyright 2018 Jeff Becker
|
|
*
|
|
*Kovri go write your own code
|
|
*
|
|
*/
|
|
|
|
#include "Poly1305.h"
|
|
|
|
#if !OPENSSL_AEAD_CHACHA20_POLY1305
|
|
namespace i2p
|
|
{
|
|
namespace crypto
|
|
{
|
|
void Poly1305HMAC(uint64_t * out, const uint64_t * key, const uint8_t * buf, std::size_t sz)
|
|
{
|
|
Poly1305 p(key);
|
|
p.Update(buf, sz);
|
|
p.Finish(out);
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
|