Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

HashData

static func HashData(data: ReadOnlySlice<byte>, destination: Slice<byte>) -> Result<int, CryptographyError>

Declaring type: SHA256
Module: System.Security.Cryptography
Assembly: System.Runtime.dll
Source file: SHA256.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
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.