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

API Browser

Module

System.Security.Cryptography

module System.Security.Cryptography

Hashing, authentication and secure random bytes

Static APIs provide SHA256.HashData, HMACSHA256.HashData/VerifyData and RandomNumberGenerator.Fill over caller-owned byte arrays. Recoverable errors use CryptographyError and Result; invalid storage remains a terminal fault.

See cryptography contracts for buffer ownership, error behavior, .NET differences and the bounded initial API surface.

Development buffer contracts use ReadOnlySlice<byte> inputs and Slice<byte> destinations. Arrays convert implicitly; range slicing selects a zero-copy window.

Types

4 items
CryptographyError Recoverable errors from the bounded cryptography operations.
HMACSHA256 One-shot HMACSHA256 operations using the runtime cryptographic provider.
RandomNumberGenerator Secure random bytes supplied by the operating-system provider.
SHA256 One-shot SHA256 operations using the runtime cryptographic provider.