<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="8.14.0" />

Microsoft.IdentityModel.Tokens.Utility

public static class Utility
Contains some utility methods.
public const string Empty = "empty"

A string with "empty" value.

public const string Null = "null"

A string with "null" value.

public static bool AreEqual(byte[] a, byte[] b)

Compares two byte arrays for equality. Hash size is fixed normally it is 32 bytes. The attempt here is to take the same time if an attacker shortens the signature OR changes some of the signed contents.

public static byte[] CloneByteArray(this byte[] src)

Creates a copy of the byte array.

public static bool IsHttps(string address)

Returns whether the input string is https.

public static bool IsHttps(Uri uri)

Returns whether the input uri is https.