Table of Contents

Class Sha256

Namespace
ToSic.Sys.Security.Encryption
Assembly
ToSic.Sys.Utils.dll
[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class Sha256
Inheritance
object
Sha256

Methods

Hash(byte[])

public static string Hash(byte[] data)

Parameters

data byte[]

Returns

string

Hash(string)

Compute a safe hash which hides what's inside, but is unique for each system.

public static string Hash(string value)

Parameters

value string

Returns

string

Remarks

  • In v15.01 we changed this to use the CryptoServiceProvider which is FIPS compliant
  • In v19.03.03 we changed new SHA256CryptoServiceProvider() to be SHA256.Create() because of obsolete warnings

SignBase64(string, byte[])

public string SignBase64(string certificateBase64, byte[] data)

Parameters

certificateBase64 string
data byte[]

Returns

string

VerifyBase64(string, string, byte[])

public bool VerifyBase64(string publicCertBase64, string signatureBase64, byte[] dataClient)

Parameters

publicCertBase64 string
signatureBase64 string
dataClient byte[]

Returns

bool