Poly1305.cpp 393 B

1234567891011121314151617181920212223242526
  1. #include "Poly1305.h"
  2. /**
  3. This code is licensed under the MCGSI Public License
  4. Copyright 2018 Jeff Becker
  5. Kovri go write your own code
  6. */
  7. #if !OPENSSL_AEAD_CHACHA20_POLY1305
  8. namespace i2p
  9. {
  10. namespace crypto
  11. {
  12. void Poly1305HMAC(uint64_t * out, const uint64_t * key, const uint8_t * buf, std::size_t sz)
  13. {
  14. Poly1305 p(key);
  15. p.Update(buf, sz);
  16. p.Finish(out);
  17. }
  18. }
  19. }
  20. #endif