Class Sha256
- Namespace
- ToSic.Sys.Security.Encryption
- Assembly
- ToSic.Sys.Utils.dll
[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class Sha256
- Inheritance
-
objectSha256
Methods
Hash(byte[])
public static string Hash(byte[] data)
Parameters
databyte[]
Returns
Hash(string)
Compute a safe hash which hides what's inside, but is unique for each system.
public static string Hash(string value)
Parameters
valuestring
Returns
Remarks
- In v15.01 we changed this to use the CryptoServiceProvider which is FIPS compliant
- In v19.03.03 we changed
new SHA256CryptoServiceProvider()to beSHA256.Create()because of obsolete warnings
SignBase64(string, byte[])
public string SignBase64(string certificateBase64, byte[] data)
Parameters
Returns
VerifyBase64(string, string, byte[])
public bool VerifyBase64(string publicCertBase64, string signatureBase64, byte[] dataClient)