Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.03k stars 1.19k forks source link

[core-amqp noitification-hubs] use hmac helper from core-util #23067

Open jeremymeng opened 2 years ago

jeremymeng commented 2 years ago

instead of having its own https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/notificationhubs/notification-hubs/src/auth/hmacSha256.ts

we could use computeSha256Hmac from core-util

https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-util/src/sha256.ts

mpodwysocki commented 2 years ago

@jeremymeng the two are not equivalent as the computeSha256Hmac puts the key into a Buffer which is not necessary in my case. core-util would have to expose a different method that does not put the key into a Buffer for this to be workable from Notification Hubs.

jeremymeng commented 2 years ago

@mpodwysocki yes I saw the slight difference and was hoping it could be reconciled...interesting to see that some scenarios require a Buffer while others just work with strings.

github-actions[bot] commented 3 days ago

Hi @jeremymeng, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

jeremymeng commented 1 day ago

still relevant