i2pd/libi2pd/Poly1305.cpp

26 lines
395 B
C++
Raw Normal View History

2018-05-24 18:27:26 +00:00
/**
* This code is licensed under the MCGSI Public License
* Copyright 2018 Jeff Becker
*
*Kovri go write your own code
*
2018-05-24 18:27:26 +00:00
*/
#include "Poly1305.h"
#if !OPENSSL_AEAD_CHACHA20_POLY1305
2018-05-24 18:27:26 +00:00
namespace i2p
{
namespace crypto
{
2018-11-24 15:07:17 +00:00
void Poly1305HMAC(uint64_t * out, const uint64_t * key, const uint8_t * buf, std::size_t sz)
2018-05-24 18:27:26 +00:00
{
2018-11-24 15:07:17 +00:00
Poly1305 p(key);
2018-05-28 13:49:59 +00:00
p.Update(buf, sz);
p.Finish(out);
2018-11-24 15:07:17 +00:00
}
2018-05-24 18:27:26 +00:00
}
}
#endif