rust/src/libextra
Palmer Cox 6386f887a7 Crypto: update checked addition functions to use CheckedAdd intrinsic.
The shift_add_check_overflow and shift_add_check_overflow_tuple functions are
re-written to be more efficient and to make use of the CheckedAdd instrinsic
instead of manually checking for integer overflow.

* The invokation leading_zeros() is removed and replaced with simple integer
  comparison. The leading_zeros() method results in a ctpop LLVM instruction
  and it may not be efficient on all architectures; integer comparisons,
  however, are efficient on just about any architecture.
* The methods lose the ability for the caller to specify a particular shift
  value - that functionality wasn't being used and removing it allows for the
  code to be simplified.
* Finally, the methods are renamed to add_bytes_to_bits and
  add_bytes_to_bits_tuple to reflect their very specific purposes.
2013-08-17 00:22:27 -04:00
..
2013-08-09 16:45:50 -07:00
2013-08-10 07:33:21 -07:00
2013-08-04 15:11:56 -07:00
2013-08-17 00:22:05 -04:00
2013-08-09 16:45:50 -07:00
2013-08-06 10:42:06 -07:00
2013-08-10 07:33:21 -07:00
2013-08-15 01:33:10 -07:00
2013-08-15 21:12:34 -04:00
2013-08-09 16:45:50 -07:00
2013-08-07 22:41:12 -04:00
2013-08-15 21:12:34 -04:00
2013-08-12 23:20:46 -07:00
2013-08-09 16:45:50 -07:00