Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Microsoft.​IdentityModel.​Tokens.​Utility
Assembly: Microsoft.IdentityModel.Tokens
Inheritance: object → Utility
Contains some utility methods.
Fields and Constants
public const
string
Empty
A string with "empty" value.
public const
string
Null
A string with "null" value.
Methods
public static
byte[]
CloneByteArray​(byte[] src)
Creates a copy of the byte array.
Returns A copy of the byte array.
src
The resource array.
public static
bool
IsHttps​(string address)
Returns whether the input string is https.
address
The input string.
Remarks
true if the input string is https; otherwise, false.
public static
bool
IsHttps​(System.​Uri uri)
Returns whether the input uri is https.
Returns true if the input uri is https; otherwise, false.
uri
<see cref="T:System.Uri" /> .
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.
Returns true if the bytes are equal, false otherwise.
a
One set of bytes to compare.
b
The other set of bytes to compare with.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object