aboutsummaryrefslogtreecommitdiff
path: root/src/passwordmaker/base_conversion/mod.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename "potency" to "power", the English term.Andreas Grois2022-10-231-2/+2
| | | | | 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-1/+3
| | | | | | | | | | | 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...
* Exponential search for largest potency.Andreas Grois2022-10-211-2/+0
| | | | | Speeds up the 20 and 32 byte cases. Has slightly negative impact for 16 byte case.
* Draft of iterative_conversion.Andreas Grois2022-10-181-24/+27
|
* First draft of (untested) iterative conversion.Andreas Grois2022-10-181-1/+5
|
* Fix Rust 1.52 compat.Andreas Grois2022-10-111-3/+2
|
* Refactor base_conversion. Fix hmac byte bug.Andreas Grois2022-10-111-0/+65
Moved the basis conversion into a submodule, to ease the upcoming rewrite. Add a couple of new integration tests. Fix a bug caused by misreading the PasswordMaker Pro HMAC code.