Method
HashData
static func HashData(key: ReadOnlySlice<byte>, data: ReadOnlySlice<byte>, destination: Slice<byte>) -> Result<int, CryptographyError>
Declaring type: HMACSHA256
Module: System.Security.Cryptography
Assembly: System.Runtime.dll
Source file: HMACSHA256.rvn
Writes a 32-byte digest. Short destinations remain unchanged; trailing bytes are preserved. Inputs may overlap destination and are never retained.
Parameters
| Name | Type | Description |
|---|---|---|
key |
ReadOnlySlice<Byte> | Fully initialized key bytes; empty keys are accepted. |
data |
ReadOnlySlice<Byte> | Fully initialized input bytes; empty data is accepted. |
destination |
Slice<Byte> | Writable byte slice of at least 32 bytes. |
Return value
Result<Int32, CryptographyError>
Ok(32), or Failure(DestinationTooSmall) without mutation.
Remarks
Invalid storage or uninitialized inputs are terminal faults.