FixedTimeEquals.Test method (1 of 7)
Compares two byte arrays in constant time to prevent timing attacks.
public static bool Test(byte[] a, byte[] b)
parameter | description |
---|---|
a | First byte array. |
b | Second byte array. |
Return Value
True if both arrays are equal, false otherwise.
See Also
- class FixedTimeEquals
- namespace Kestrun
FixedTimeEquals.Test method (2 of 7)
Compares a byte array and a string in constant time to prevent timing attacks.
public static bool Test(byte[] a, string b)
parameter | description |
---|---|
a | The byte array to compare. |
b | The string to compare. |
Return Value
True if both are equal, false otherwise.
See Also
- class FixedTimeEquals
- namespace Kestrun
FixedTimeEquals.Test method (3 of 7)
Compares two byte arrays in constant time to prevent timing attacks.
public static bool Test(ReadOnlySpan<byte> a, ReadOnlySpan<byte> b)
parameter | description |
---|---|
a | First byte array. |
b | Second byte array. |
Return Value
True if both arrays are equal, false otherwise.
See Also
- class FixedTimeEquals
- namespace Kestrun
FixedTimeEquals.Test method (4 of 7)
Compares a byte span and a string in constant time to prevent timing attacks.
public static bool Test(ReadOnlySpan<byte> a, string? b)
parameter | description |
---|---|
a | The byte span to compare. |
b | The string to compare. |
Return Value
True if both are equal, false otherwise.
See Also
- class FixedTimeEquals
- namespace Kestrun
FixedTimeEquals.Test method (5 of 7)
Compares a string and a byte array in constant time to prevent timing attacks.
public static bool Test(string? a, byte[] b)
parameter | description |
---|---|
a | The string to compare. |
b | The byte array to compare. |
Return Value
True if both are equal, false otherwise.
See Also
- class FixedTimeEquals
- namespace Kestrun
FixedTimeEquals.Test method (6 of 7)
Compares a string and a byte span in constant time to prevent timing attacks.
public static bool Test(string? a, ReadOnlySpan<byte> b)
parameter | description |
---|---|
a | The string to compare. |
b | The byte span to compare. |
Return Value
True if both are equal, false otherwise.
See Also
- class FixedTimeEquals
- namespace Kestrun
FixedTimeEquals.Test method (7 of 7)
Compares two strings in constant time to prevent timing attacks.
public static bool Test(string? a, string? b)
parameter | description |
---|---|
a | First string to compare. |
b | Second string to compare. |
Return Value
True if both strings are equal, false otherwise.
See Also
- class FixedTimeEquals
- namespace Kestrun