mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 03:37:49 +02:00
ntcp2 crypto added
This commit is contained in:
parent
d289aa71eb
commit
5d86c1c9a6
5 changed files with 656 additions and 0 deletions
28
libi2pd/Poly1305.h
Normal file
28
libi2pd/Poly1305.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
This code is licensed under the MCGSI Public License
|
||||
Copyright 2018 Jeff Becker
|
||||
|
||||
Kovri go write your own code
|
||||
|
||||
*/
|
||||
#ifndef LIBI2PD_POLY1305_H
|
||||
#define LIBI2PD_POLY1305_H
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace crypto
|
||||
{
|
||||
const std::size_t POLY1305_DIGEST_BYTES = 16;
|
||||
const std::size_t POLY1305_DIGEST_DWORDS = 4;
|
||||
const std::size_t POLY1305_KEY_BYTES = 32;
|
||||
const std::size_t POLY1305_KEY_DWORDS = 8;
|
||||
const std::size_t POLY1305_BLOCK_BYTES = 16;
|
||||
|
||||
void Poly1305HMAC(uint32_t * out, const uint32_t * key, const uint8_t * buf, std::size_t sz);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue