Condividi tramite


Utility.AreEqual(Byte[], Byte[]) Method

Definition

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 bool AreEqual (byte[] a, byte[] b);
static member AreEqual : byte[] * byte[] -> bool
Public Function AreEqual (a As Byte(), b As Byte()) As Boolean

Parameters

a
Byte[]

One set of bytes to compare.

b
Byte[]

The other set of bytes to compare with.

Returns

true if the bytes are equal, false otherwise.

Applies to