Skip to content

Commit 7924b79

Browse files
authored
feat(hashmap): add fallible constructors and security considerations (#105)
- Introduced `try_new` and `try_with_hasher` methods for `HashMapStore` and `ConcurrentHashMapStore`, allowing for non-panicking allocation when capacity is derived from untrusted input. - Enhanced module documentation with a new section on security considerations, detailing risks associated with hashers, capacity management, and handling sensitive values. - Updated the `clear` method to attribute removed entries to the `removes` metric, ensuring accurate audit trails. - Improved documentation for existing constructors to clarify panic behavior on allocator failure. These changes enhance the robustness and security of the hashmap implementations, aligning with best practices for handling untrusted input and sensitive data.
1 parent 693ed10 commit 7924b79

1 file changed

Lines changed: 404 additions & 7 deletions

File tree

0 commit comments

Comments
 (0)