mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	preferred crypto type for Decrypt
This commit is contained in:
		
							parent
							
								
									f4ca6bbb52
								
							
						
					
					
						commit
						f21af4068f
					
				
					 10 changed files with 14 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -59,7 +59,7 @@ namespace client
 | 
			
		|||
		m_Decryptor = i2p::data::PrivateKeys::CreateDecryptor (m_Identity->GetCryptoKeyType (), m_EncryptionPrivateKey);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	bool I2CPDestination::Decrypt (const uint8_t * encrypted, uint8_t * data, BN_CTX * ctx) const
 | 
			
		||||
	bool I2CPDestination::Decrypt (const uint8_t * encrypted, uint8_t * data, BN_CTX * ctx, i2p::data::CryptoKeyType preferredCrypto) const
 | 
			
		||||
	{
 | 
			
		||||
		if (m_Decryptor)
 | 
			
		||||
			return m_Decryptor->Decrypt (encrypted, data, ctx, true);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,7 +80,7 @@ namespace client
 | 
			
		|||
			void SendMsgTo (const uint8_t * payload, size_t len, const i2p::data::IdentHash& ident, uint32_t nonce); // called from I2CPSession
 | 
			
		||||
 | 
			
		||||
			// implements LocalDestination
 | 
			
		||||
			bool Decrypt (const uint8_t * encrypted, uint8_t * data, BN_CTX * ctx) const;
 | 
			
		||||
			bool Decrypt (const uint8_t * encrypted, uint8_t * data, BN_CTX * ctx, i2p::data::CryptoKeyType preferredCrypto) const;
 | 
			
		||||
			bool SupportsEncryptionType (i2p::data::CryptoKeyType keyType) const { return m_EncryptionKeyType == keyType; };
 | 
			
		||||
			// TODO: implement GetEncryptionPublicKey 
 | 
			
		||||
			std::shared_ptr<const i2p::data::IdentityEx> GetIdentity () const { return m_Identity; };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue