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

Created on 6 May 2020  路  4Comments  路  Source: dotnet/runtime

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

api-approved area-System.Security

Most helpful comment

@vcsjones Bulk operation error, fixed now.

All 4 comments

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

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

@vcsjones Bulk operation error, fixed now.

Video

Looks good as proposed.

```C#
namespace System.Security.Cryptography
{
public partial class IncrementalHash
{
public static IncrementalHash CreateHMAC(HashAlgorithmName hashAlgorithm, ReadOnlySpan key);
}
}

Was this page helpful?
0 / 5 - 0 ratings