aboutsummaryrefslogtreecommitdiff
path: root/src/passwordmaker/base_conversion/iterative_conversion.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename "potency" to "power", the English term.Andreas Grois2022-10-231-16/+16
| | | | | It seems English doesn't use the word potency in this context, but rather uses power.
* Precompute power+exponent for iterative conversionAndreas Grois2022-10-231-10/+22
| | | | | | | | | | | The maximum power of the base that can fit into a given data type is constant. There's no point in computing it at runtime, if we can just store it in a compile-time constants array. The code isn't the most beautiful, but that's mostly because Rust const functions are still a bit limited. One function was duplicated, because it was easy to get a slow version to compile in const context, and const context doesn't really care...
* Fix trait visibility.Andreas Grois2022-10-211-1/+1
|
* Exponential search for largest potency.Andreas Grois2022-10-211-6/+17
| | | | | Speeds up the 20 and 32 byte cases. Has slightly negative impact for 16 byte case.
* Draft of iterative_conversion.Andreas Grois2022-10-181-1/+8
|
* First draft of (untested) iterative conversion.Andreas Grois2022-10-181-0/+144