i2pd/libi2pd/Poly1305.cpp

26 lines
375 B
C++
Raw Normal View History

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