DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
26.94k stars 1.45k forks source link

Base64 Hash Generator makes everything lower case #395

Closed thomhurst closed 2 years ago

thomhurst commented 2 years ago

Description

A base64 hash by default has a mixture of uppercase and lowercase.

Devtoys is calling ToLowerInvariant() on these, and therefore this isn't a true base64 hash.

See here the base64 SHA outputs: https://approsto.com/sha-generator/

Steps To Reproduce

Go to Hash Generator Select Output Type Base64 Enter an input SHA outputs are all lowercase

I believe this is the offending line: https://github.com/veler/DevToys/blob/af575d672ed4246b226ff17dfd88437187ffaefd/src/dev/impl/DevToys/ViewModels/Tools/Generators/HashGenerator/HashGeneratorToolViewModel.cs#L206

Expected behavior

Base64 SHA outputs should be a mixture of casing.

DevToys Version

Version 1.0.3.0 | X64 | RELEASE | 7c7c02a | 7c7c02a

Relevant Assets/Logs

N/A

a-khanna commented 2 years ago

Submitted a PR 👆