mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	made Encrypt const
This commit is contained in:
		
							parent
							
								
									634976cdde
								
							
						
					
					
						commit
						3a26383c4d
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -26,7 +26,7 @@ namespace crypto
 | 
				
			||||||
				b1 = a_exp_b_mod_c (y, k, elgp);
 | 
									b1 = a_exp_b_mod_c (y, k, elgp);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			void Encrypt (const uint8_t * data, int len, uint8_t * encrypted, bool zeroPadding = false)
 | 
								void Encrypt (const uint8_t * data, int len, uint8_t * encrypted, bool zeroPadding = false) const
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				// calculate b = b1*m mod p
 | 
									// calculate b = b1*m mod p
 | 
				
			||||||
				uint8_t m[255];
 | 
									uint8_t m[255];
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -226,7 +226,7 @@ namespace data
 | 
				
			||||||
			virtual const uint8_t * GetEncryptionPublicKey () const = 0;
 | 
								virtual const uint8_t * GetEncryptionPublicKey () const = 0;
 | 
				
			||||||
			virtual bool IsDestination () const = 0; // for garlic 
 | 
								virtual bool IsDestination () const = 0; // for garlic 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			i2p::crypto::ElGamalEncryption * GetElGamalEncryption () const
 | 
								const i2p::crypto::ElGamalEncryption * GetElGamalEncryption () const
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				if (!m_ElGamalEncryption)
 | 
									if (!m_ElGamalEncryption)
 | 
				
			||||||
					m_ElGamalEncryption = new i2p::crypto::ElGamalEncryption (GetEncryptionPublicKey ());
 | 
										m_ElGamalEncryption = new i2p::crypto::ElGamalEncryption (GetEncryptionPublicKey ());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue