mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 00:20:46 +00:00 
			
		
		
		
	handle encrypted LS2
This commit is contained in:
		
							parent
							
								
									fdcea5537c
								
							
						
					
					
						commit
						b5596c4596
					
				
					 2 changed files with 67 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -116,6 +116,7 @@ namespace data
 | 
			
		|||
	bool LeaseSetBufferValidate(const uint8_t * ptr, size_t sz, uint64_t & expires);
 | 
			
		||||
 | 
			
		||||
	const uint8_t NETDB_STORE_TYPE_STANDARD_LEASESET2 = 3;
 | 
			
		||||
	const uint8_t NETDB_STORE_TYPE_ENCRYPTED_LEASESET2 = 5;
 | 
			
		||||
	const uint8_t NETDB_STORE_TYPE_META_LEASESET2 = 7;
 | 
			
		||||
	class LeaseSet2: public LeaseSet
 | 
			
		||||
	{
 | 
			
		||||
| 
						 | 
				
			
			@ -127,9 +128,13 @@ namespace data
 | 
			
		|||
		private:
 | 
			
		||||
 | 
			
		||||
			void ReadFromBuffer (const uint8_t * buf, size_t len);
 | 
			
		||||
			void ReadFromBufferEncrypted (const uint8_t * buf, size_t len);
 | 
			
		||||
			size_t ReadStandardLS2TypeSpecificPart (const uint8_t * buf, size_t len);
 | 
			
		||||
			size_t ReadMetaLS2TypeSpecificPart (const uint8_t * buf, size_t len);
 | 
			
		||||
 | 
			
		||||
			template<typename Verifier>
 | 
			
		||||
			bool VerifySignature (Verifier& verifier, const uint8_t * buf, size_t len, size_t signatureOffset);
 | 
			
		||||
 | 
			
		||||
		private:
 | 
			
		||||
 | 
			
		||||
			uint8_t m_StoreType;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue