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