commit
						7a64e13845
					
				@ -35,6 +35,8 @@ int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keyle
 | 
				
			|||||||
   LTC_ARGCHK(key != NULL);
 | 
					   LTC_ARGCHK(key != NULL);
 | 
				
			||||||
   LTC_ARGCHK(keylen == 32 || keylen == 16);
 | 
					   LTC_ARGCHK(keylen == 32 || keylen == 16);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   if (rounds == 0) rounds = 20;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   LOAD32L(st->input[4], key + 0);
 | 
					   LOAD32L(st->input[4], key + 0);
 | 
				
			||||||
   LOAD32L(st->input[5], key + 4);
 | 
					   LOAD32L(st->input[5], key + 4);
 | 
				
			||||||
   LOAD32L(st->input[6], key + 8);
 | 
					   LOAD32L(st->input[6], key + 8);
 | 
				
			||||||
 | 
				
			|||||||
@ -73,8 +73,7 @@ static ulong64 epoch_usec(void)
 | 
				
			|||||||
  return cur_time;
 | 
					  return cur_time;
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  struct timeval tv;
 | 
					  struct timeval tv;
 | 
				
			||||||
  struct timezone tz;
 | 
					  gettimeofday(&tv, NULL);
 | 
				
			||||||
  gettimeofday(&tv, &tz);
 | 
					 | 
				
			||||||
  return (ulong64)(tv.tv_sec) * 1000000 + (ulong64)(tv.tv_usec); /* get microseconds */
 | 
					  return (ulong64)(tv.tv_sec) * 1000000 + (ulong64)(tv.tv_usec); /* get microseconds */
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user