1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-15 01:20:10 +00:00
i2pd/libi2pd/Poly1305.cpp

25 lines
391 B
C++
Raw Normal View History

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