ATLAS Offline Software
Functions
picosha2::impl Namespace Reference

Functions

template<typename RaIter , typename OutIter >
void hash256_impl (RaIter first, RaIter last, OutIter first2, OutIter last2, int, std::random_access_iterator_tag)
 
template<typename InputIter , typename OutIter >
void hash256_impl (InputIter first, InputIter last, OutIter first2, OutIter last2, int buffer_size, std::input_iterator_tag)
 

Function Documentation

◆ hash256_impl() [1/2]

template<typename InputIter , typename OutIter >
void picosha2::impl::hash256_impl ( InputIter  first,
InputIter  last,
OutIter  first2,
OutIter  last2,
int  buffer_size,
std::input_iterator_tag   
)

Definition at line 308 of file picosha2.h.

309  {
310  std::vector<byte_t> buffer(buffer_size);
311  hash256_one_by_one hasher;
312  // hasher.init();
313  while (first != last) {
314  int size = buffer_size;
315  for (int i = 0; i != buffer_size; ++i, ++first) {
316  if (first == last) {
317  size = i;
318  break;
319  }
320  buffer[i] = *first;
321  }
322  hasher.process(buffer.begin(), buffer.begin() + size);
323  }
324  hasher.finish();
325  hasher.get_hash_bytes(first2, last2);
326  }

◆ hash256_impl() [2/2]

template<typename RaIter , typename OutIter >
void picosha2::impl::hash256_impl ( RaIter  first,
RaIter  last,
OutIter  first2,
OutIter  last2,
int  ,
std::random_access_iterator_tag   
)

Definition at line 297 of file picosha2.h.

298  {
299  hash256_one_by_one hasher;
300 
301  // hasher.init();
302  hasher.process(first, last);
303  hasher.finish();
304  hasher.get_hash_bytes(first2, last2);
305  }
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
createCoolChannelIdFile.buffer
buffer
Definition: createCoolChannelIdFile.py:12
lumiFormat.i
int i
Definition: lumiFormat.py:92
DeMoScan.first
bool first
Definition: DeMoScan.py:534