Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMAC-SHA256 Generator Tool #516

Closed
wapenshaw opened this issue May 9, 2022 · 5 comments · Fixed by #555
Closed

HMAC-SHA256 Generator Tool #516

wapenshaw opened this issue May 9, 2022 · 5 comments · Fixed by #555

Comments

@wapenshaw
Copy link

wapenshaw commented May 9, 2022

What's the Problem?

Could we have under hash Generators the HMAC-SHA256/512 generator?

Solution/Idea

HMAC(Hash-based message authentication code) is a message authentication code that uses a cryptographic hash function such as SHA-256, SHA-512 and a secret key known as a cryptographic key. HMAC is more secure than any other authentication codes as it contains Hashing as well as MAC.

Alternatives

Its a simple tool previewed here https://www.devglan.com/online-tools/hmac-sha256-online

Priorities

Capability Priority
This proposal will allow developers to accomplish generating Hash-based message authentication code using a secret key

Comments

Ability to generate hash based on a secret key

@L1nu5
Copy link
Contributor

L1nu5 commented May 17, 2022

I thought of this design: A simple text box for the secret key - if it's non-empty, then use HMAC variants (HMACMD5, HMACSHA1 etc), otherwise simply use regular hashing algorithms. I have a prototype in progress, I'll share screenshots in few days.

@L1nu5
Copy link
Contributor

L1nu5 commented May 18, 2022

Here's the functional version that I could implement:

image

There are other designs which are also possible:

  1. Separate Hashing page for HMAC entirely (this could be an overkill)
  2. A toggle switch to enable/disable Secret key textbox

I'm using MacAlgorithmProvider currently for this feature. I also noticed that SHA 384 hash output is missing, I could add implement that as well but I'm not sure why it was not added on the Hash generator screen.

@wapenshaw
Copy link
Author

@L1nu5 I agree with both your points, separate page just for HMAC would be overkill, by default you can disable the HMAC toggle so that it wont confuse users already using this page extensively. Also the Input field for the secret key could be better off being a single line text box.

Also thanks for responding. :)

@L1nu5
Copy link
Contributor

L1nu5 commented May 19, 2022

@wapenshaw No problem! Here's what it looks like now:

1. Normal mode

image

2. HMAC mode

image

Things still need to be done:

  1. I'm still fairly new to WPF/UWP stuff, and was wondering where I could find icons and their hexadecimal codes. It seems that we are using FluentSystemIcons by looking at some other XAML files in the solution. I also looked at this repository for any information on hex codes for the icons but could not find much. Any directions on this are very much appreciated.

  2. I'm currently using hardcoded strings for the toggle switch and the secret key textbox title. I'm pretty sure we would need localized versions of these two but we could also do this after we merge my PR.

I'm still waiting for any other design suggestions. If this version is the ideal one, I'll issue a PR.

@veler veler linked a pull request Jun 4, 2022 that will close this issue
12 tasks
@veler veler closed this as completed in #555 Jun 6, 2022
@doggy8088
Copy link

@veler I couldn't see the latest version (Version 1.0.8.0 | X64 | RELEASE | db9b428 | db9b428) have this new feature. Is it published?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants