microsoft / security-utilities

Security utilities for key generation, string redaction, etc.
MIT License
25 stars 11 forks source link

Byte array corrections #96

Closed michaelcfanning closed 1 month ago

michaelcfanning commented 1 month ago

This change ensures that all byte[] randomized data is processed as base64 (rather than encoding and decoding as UTF8 a process that stripped entropy). This change includes testing that achieves effectively 100% code coverage (which will assist in future refactoring/simplification of code).

Regrettably, I also noted that the SecretMasker test class had been commented out. As a result, tests have not been running for some period of time. I've fixed up some regressions that have accumulated but did not fix a condition in which some lower confidence findings produce duplicated results for the same test data. #95 opened to address this.