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

Use toggleString for Key in HMAC #391

Merged
merged 2 commits into from
Nov 7, 2018
Merged

Conversation

qistoph
Copy link
Contributor

@qistoph qistoph commented Oct 12, 2018

Use toggleString for Key in HMAC as proposed in #263. This makes HMAC additionally support keys formatted as:

  • Hex
  • Decimal
  • Base64
  • UTF-8

HMAC will produce the same results as before when using Latin1:

Input: asdffa

Old recipe: HMAC('01020304€','MD5')

New recipe: HMAC({'option':'Latin1','string':'01020304€'},'MD5')

Output: 4f0fa244b0dd2f9c257abc906bdf2a7a

@n1474335
Copy link
Member

n1474335 commented Nov 7, 2018

Great, thanks!

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 this pull request may close these issues.

2 participants