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

Improve HMAC generator to accept encoded (Hex / Base64) or un-encoded keys #9764

Closed
ayomawdb opened this issue Jul 30, 2018 · 0 comments
Closed
Assignees
Labels
Team/StandardLibs All Ballerina standard libraries Type/Improvement
Milestone

Comments

@ayomawdb
Copy link
Member

Description:
Currently the HMAC generator expects an un-encoded key to proceed (text). It is required to provide the ability to use encoded key values with the HMAC generation function. This can be done by accepting the encoding type as an additional parameter:

public native function hmac(string baseString, string keyString, Encoding keyEncoding, Algorithm algorithm) returns (string);

This is discussed in [email protected] mail thread "AWS signature requires digest (binary format)". n2group/package-crypto implements a temporary solution until this improvement is done.

Steps to reproduce:
N/A

Affected Versions:
0.980.1

OS, DB, other environment details and versions:
N/A

Suggested Labels (optional):
Component/stdlib Type/Improvement

Suggested Assignees (optional):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/StandardLibs All Ballerina standard libraries Type/Improvement
Projects
None yet
Development

No branches or pull requests

3 participants