SecurityExtensionsSecureEquals(Guid, Guid) Method
Does a secure time constant comparison of the two GUIDs.
Namespace: SnapDB.SecurityAssembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public static bool SecureEquals(
this Guid a,
Guid b
)
<ExtensionAttribute>
Public Shared Function SecureEquals (
a As Guid,
b As Guid
) As Boolean
public:
[ExtensionAttribute]
static bool SecureEquals(
Guid a,
Guid b
)
SnapDB.Security.SecurityExtensions.SecureEquals = function(a, b);
- a Guid
- The first GUID to compare.
- b Guid
- The second GUID to compare.
Booleantrue if both GUIDs are equal; otherwise, false.In Visual Basic and C#, you can call this method as an instance method on any object of type
Guid. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Certain cryptographic attacks can occur by comparing the amount of time it
takes to do certain operations. Comparing two byte arrays is one example.
Therefore this method should take constant time to do a comparison of two GUIDs.