Expand description
Excel-compatible password hashes for protection (ECMA-376 Part 1 §18.2.29 and §18.3.1.66
attribute sets): the legacy 16-bit hash (password="CC1A") and the iterated, salted hash
(algorithmName, hashValue, saltValue, spinCount). Protection is a convenience, not
security, but verification really checks the password: an unsupported variant is refused,
never accepted.
Enums§
Constants§
- DEFAULT_
SPIN_ COUNT - Excel’s default spin count for new passwords.
- MAX_
SPIN_ COUNT - Largest spin count accepted when verifying (the documented maximum); a file asking for more would only make verification hang.
Functions§
- legacy_
hash - The legacy 16-bit password hash: each UTF-16 unit contributes its low byte (its high byte
when the low one is zero), folded in from the last character with a 15-bit rotation, then
the length and the constant
0xCE4B. - salt_
from - A 16-byte salt derived from
seed(callers mix in what varies: names, a counter, the clock).