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

API Proposal: Make IncrementalHash.CreateHMAC ReadOnlySpan<byte> key public #35869

Closed
vcsjones opened this issue May 5, 2020 · 4 comments · Fixed by #39097
Closed

API Proposal: Make IncrementalHash.CreateHMAC ReadOnlySpan<byte> key public #35869

vcsjones opened this issue May 5, 2020 · 4 comments · Fixed by #39097
Labels
api-approved API was approved in API review, it can be implemented area-System.Security
Milestone

Comments

@vcsjones
Copy link
Member

vcsjones commented May 5, 2020

Since HKDF was added, IncrementalHash has had support for ReadOnlySpan<byte> HMAC keys, but it isn't made public.

The functionality is already there, it just needs to be changed from internal to public and given proper test coverage.

Proposal:

 namespace System.Security.Cryptography {
     public sealed class IncrementalHash : IDisposable {
        // existing method changed from internal to public
        public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
     }
 }

/cc @JimBobSquarePants

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Security untriaged New issue has not been triaged by the area owner labels May 5, 2020
@ghost
Copy link

ghost commented May 5, 2020

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq
Notify danmosemsft if you want to be subscribed.

@bartonjs bartonjs added api-ready-for-review and removed untriaged New issue has not been triaged by the area owner labels May 6, 2020
@bartonjs bartonjs added this to the 5.0 milestone May 6, 2020
@vcsjones
Copy link
Member Author

vcsjones commented Jul 6, 2020

@bartonjs @carlossanlop why is this no longer ready for review?

@bartonjs bartonjs added the api-ready-for-review API is ready for review, it is NOT ready for implementation label Jul 6, 2020
@bartonjs
Copy link
Member

bartonjs commented Jul 6, 2020

@vcsjones Bulk operation error, fixed now.

@terrajobst
Copy link
Member

terrajobst commented Jul 10, 2020

Video

Looks good as proposed.

namespace System.Security.Cryptography
{
     public partial class IncrementalHash
     {
        public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, ReadOnlySpan<byte> key);
     }
 }

@terrajobst terrajobst added api-approved API was approved in API review, it can be implemented and removed api-ready-for-review API is ready for review, it is NOT ready for implementation labels Jul 10, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-System.Security
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants