mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
RC4_SHA cipher suite
This commit is contained in:
parent
ec68338a20
commit
0a15088572
2 changed files with 82 additions and 27 deletions
9
Reseed.h
9
Reseed.h
|
@ -57,6 +57,7 @@ namespace data
|
|||
virtual void CalculateMAC (uint8_t type, const uint8_t * buf, size_t len, uint8_t * mac) = 0;
|
||||
virtual size_t Encrypt (const uint8_t * in, size_t len, const uint8_t * mac, uint8_t * out) = 0;
|
||||
virtual size_t Decrypt (uint8_t * buf, size_t len) = 0;
|
||||
virtual size_t GetIVSize () const { return 0; }; // override for AES
|
||||
};
|
||||
|
||||
|
||||
|
@ -68,10 +69,7 @@ namespace data
|
|||
~TlsSession ();
|
||||
void Send (const uint8_t * buf, size_t len);
|
||||
bool Receive (std::ostream& rs);
|
||||
|
||||
static void PRF (const uint8_t * secret, const char * label, const uint8_t * random, size_t randomLen,
|
||||
size_t len, uint8_t * buf);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void Handshake ();
|
||||
|
@ -79,6 +77,9 @@ namespace data
|
|||
void SendFinishedMsg ();
|
||||
CryptoPP::RSA::PublicKey ExtractPublicKey (const uint8_t * certificate, size_t len);
|
||||
|
||||
void PRF (const uint8_t * secret, const char * label, const uint8_t * random, size_t randomLen,
|
||||
size_t len, uint8_t * buf);
|
||||
|
||||
private:
|
||||
|
||||
boost::asio::ip::tcp::iostream m_Site;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue