Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
446 lines (429 sloc) 26 KB
<Type Name="HMACSHA256" FullName="System.Security.Cryptography.HMACSHA256">
<TypeSignature Language="C#" Value="public class HMACSHA256 : System.Security.Cryptography.HMAC" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit HMACSHA256 extends System.Security.Cryptography.HMAC" />
<TypeSignature Language="DocId" Value="T:System.Security.Cryptography.HMACSHA256" />
<TypeSignature Language="VB.NET" Value="Public Class HMACSHA256&#xA;Inherits HMAC" />
<TypeSignature Language="C++ CLI" Value="public ref class HMACSHA256 : System::Security::Cryptography::HMAC" />
<TypeSignature Language="F#" Value="type HMACSHA256 = class&#xA; inherit HMAC" />
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Security.Cryptography.HMAC</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Computes a Hash-based Message Authentication Code (HMAC) by using the <see cref="T:System.Security.Cryptography.SHA256" /> hash function.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Security.Cryptography.HMACSHA256> is a type of keyed hash algorithm that is constructed from the SHA-256 hash function and used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data, hashes the result with the hash function, mixes that hash value with the secret key again, and then applies the hash function a second time. The output hash is 256 bits in length.
An HMAC can be used to determine whether a message sent over an insecure channel has been tampered with, provided that the sender and receiver share a secret key. The sender computes the hash value for the original data and sends both the original data and hash value as a single message. The receiver recalculates the hash value on the received message and checks that the computed HMAC matches the transmitted HMAC.
Any change to the data or the hash value results in a mismatch, because knowledge of the secret key is required to change the message and reproduce the correct hash value. Therefore, if the original and computed hash values match, the message is authenticated.
<xref:System.Security.Cryptography.HMACSHA256> accepts keys of any size, and produces a hash sequence 256 bits in length.
## Examples
The following example shows how to sign a file by using the <xref:System.Security.Cryptography.HMACSHA256> object and then how to verify the file.
[!code-cpp[HMACSHA256#1](~/samples/snippets/cpp/VS_Snippets_CLR/HMACSHA256/CPP/hmacsha256.cpp#1)]
[!code-csharp[HMACSHA256#1](~/samples/snippets/csharp/VS_Snippets_CLR/HMACSHA256/CS/hmacsha256.cs#1)]
[!code-vb[HMACSHA256#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/HMACSHA256/vb/hmacsha256.vb#1)]
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA256" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HMACSHA256 ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HMACSHA256();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA256" /> class with a randomly generated key.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Security.Cryptography.HMACSHA256> is a type of keyed hash algorithm that is constructed from the SHA-256 hash function and used as a Hash-based Message Authentication Code (HMAC). The HMAC process mixes a secret key with the message data, hashes the result with the hash function, mixes that hash value with the secret key again, and then applies the hash function a second time. The output hash is 256 bits in length.
This constructor uses a 64-byte, randomly generated key.
]]></format>
</remarks>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HMACSHA256 (byte[] key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(unsigned int8[] key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.#ctor(System.Byte[])" />
<MemberSignature Language="VB.NET" Value="Public Sub New (key As Byte())" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HMACSHA256(cli::array &lt;System::Byte&gt; ^ key);" />
<MemberSignature Language="F#" Value="new System.Security.Cryptography.HMACSHA256 : byte[] -&gt; System.Security.Cryptography.HMACSHA256" Usage="new System.Security.Cryptography.HMACSHA256 key" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="key" Type="System.Byte[]" />
</Parameters>
<Docs>
<param name="key">The secret key for <see cref="T:System.Security.Cryptography.HMACSHA256" /> encryption. The key can be any length. However, the recommended size is 64 bytes. If the key is more than 64 bytes long, it is hashed (using SHA-256) to derive a 64-byte key. If it is less than 64 bytes long, it is padded to 64 bytes.</param>
<summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.HMACSHA256" /> class with the specified key data.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Security.Cryptography.HMACSHA256> is a type of keyed hash algorithm that is constructed from the SHA-256 hash function and used as a Hash-based Message Authentication Code. The HMAC process mixes a secret key with the message data, hashes the result with the hash function, mixes that hash value with the secret key again, and then applies the hash function a second time. The output hash is 256 bits in length.
## Examples
For an example of how to use this constructor, see the <xref:System.Security.Cryptography.HMACSHA256> class.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
<related type="Article" href="~/docs/standard/security/cryptographic-services.md">Cryptographic Services</related>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="override this.Dispose : bool -&gt; unit" Usage="hMACSHA256.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" Index="0" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.1" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Security.Cryptography.HMACSHA256" /> and optionally releases the managed resources.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HashCore">
<MemberSignature Language="C#" Value="protected override void HashCore (ReadOnlySpan&lt;byte&gt; source);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void HashCore(valuetype System.ReadOnlySpan`1&lt;unsigned int8&gt; source) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.HashCore(System.ReadOnlySpan{System.Byte})" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub HashCore (source As ReadOnlySpan(Of Byte))" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void HashCore(ReadOnlySpan&lt;System::Byte&gt; source);" />
<MemberSignature Language="F#" Value="override this.HashCore : ReadOnlySpan&lt;byte&gt; -&gt; unit" Usage="hMACSHA256.HashCore source" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="source" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1;netcore-3.1" />
</Parameters>
<Docs>
<param name="source">The input to compute the HMAC for.</param>
<summary>Routes data written to the object into the HMAC algorithm for computing the HMAC.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HashCore">
<MemberSignature Language="C#" Value="protected override void HashCore (byte[] rgb, int ib, int cb);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void HashCore(unsigned int8[] rgb, int32 ib, int32 cb) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.HashCore(System.Byte[],System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub HashCore (rgb As Byte(), ib As Integer, cb As Integer)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void HashCore(cli::array &lt;System::Byte&gt; ^ rgb, int ib, int cb);" />
<MemberSignature Language="F#" Value="override this.HashCore : byte[] * int * int -&gt; unit" Usage="hMACSHA256.HashCore (rgb, ib, cb)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rgb" Type="System.Byte[]" Index="0" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.1" />
<Parameter Name="ib" Type="System.Int32" Index="1" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.1" />
<Parameter Name="cb" Type="System.Int32" Index="2" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;netstandard-1.3;netstandard-1.4;netstandard-1.6;netstandard-2.1" />
</Parameters>
<Docs>
<param name="rgb">The input to compute the HMAC for.</param>
<param name="ib">The offset into the byte array from which to begin using data.</param>
<param name="cb">The number of bytes in the byte array to use as data.</param>
<summary>Routes data written to the object into the HMAC algorithm for computing the HMAC.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HashFinal">
<MemberSignature Language="C#" Value="protected override byte[] HashFinal ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance unsigned int8[] HashFinal() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.HashFinal" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function HashFinal () As Byte()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override cli::array &lt;System::Byte&gt; ^ HashFinal();" />
<MemberSignature Language="F#" Value="override this.HashFinal : unit -&gt; byte[]" Usage="hMACSHA256.HashFinal " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Finalizes the HMAC computation after the last data is processed by the algorithm.</summary>
<returns>The computed HMAC value in a byte array.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="HashSize">
<MemberSignature Language="C#" Value="public override int HashSize { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 HashSize" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.HMACSHA256.HashSize" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property HashSize As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property int HashSize { int get(); };" />
<MemberSignature Language="F#" Value="member this.HashSize : int" Usage="System.Security.Cryptography.HMACSHA256.HashSize" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the size, in bits, of the computed HMAC.</summary>
<value>The size, in bits, of the computed HMAC.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Initialize">
<MemberSignature Language="C#" Value="public override void Initialize ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Initialize() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.Initialize" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub Initialize ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void Initialize();" />
<MemberSignature Language="F#" Value="override this.Initialize : unit -&gt; unit" Usage="hMACSHA256.Initialize " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Resets the hash algorithm to its initial state.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Key">
<MemberSignature Language="C#" Value="public override byte[] Key { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance unsigned int8[] Key" />
<MemberSignature Language="DocId" Value="P:System.Security.Cryptography.HMACSHA256.Key" />
<MemberSignature Language="VB.NET" Value="Public Overrides Property Key As Byte()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property cli::array &lt;System::Byte&gt; ^ Key { cli::array &lt;System::Byte&gt; ^ get(); void set(cli::array &lt;System::Byte&gt; ^ value); };" />
<MemberSignature Language="F#" Value="member this.Key : byte[] with get, set" Usage="System.Security.Cryptography.HMACSHA256.Key" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.3.0.0</AssemblyVersion>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Byte[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the key to use in the HMAC calculation.</summary>
<value>The key to use in the HMAC calculation.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TryHashFinal">
<MemberSignature Language="C#" Value="protected override bool TryHashFinal (Span&lt;byte&gt; destination, out int bytesWritten);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance bool TryHashFinal(valuetype System.Span`1&lt;unsigned int8&gt; destination, [out] int32&amp; bytesWritten) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Security.Cryptography.HMACSHA256.TryHashFinal(System.Span{System.Byte},System.Int32@)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Function TryHashFinal (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override bool TryHashFinal(Span&lt;System::Byte&gt; destination, [Runtime::InteropServices::Out] int % bytesWritten);" />
<MemberSignature Language="F#" Value="override this.TryHashFinal : Span&lt;byte&gt; * int -&gt; bool" Usage="hMACSHA256.TryHashFinal (destination, bytesWritten)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AssemblyVersion>4.3.1.0</AssemblyVersion>
<AssemblyVersion>4.3.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="destination" Type="System.Span&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1;netcore-3.1" />
<Parameter Name="bytesWritten" Type="System.Int32" RefType="out" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1;netcore-3.1" />
</Parameters>
<Docs>
<param name="destination">The buffer to receive the HMAC value.</param>
<param name="bytesWritten">When this method returns, the total number of bytes written into <paramref name="destination" />. This parameter is treated as uninitialized.</param>
<summary>Attempts to finalize the HMAC computation after the last data is processed by the HMAC algorithm.</summary>
<returns>
<see langword="true" /> if <paramref name="destination" /> is long enough to receive the HMAC value; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.