Skip to content

libsodium.SecureMemoryblock.Operator_Compare

Andrew Lambert edited this page Jun 4, 2023 · 6 revisions

libsodium.SecureMemoryblock.Operator_Compare

Method Signatures

 Function Operator_Compare(OtherMB As libsodium.SecureMemoryBlock) As Int32
 Function Operator_Compare(OtherMB As String) As Int32

Parameters

Operator_Compare(SecureMemoryBlock)

Name Type Comment
OtherMB SecureMemoryBlock The data to compare to Self.

Operator_Compare(String)

Name Type Comment
OtherMB String The data to compare to Self.

Return value

This method returns 0 if OtherMB and Self are identical.

Remarks

This method overloads the comparison operator (=) allowing direct comparisons between instances of SecureMemoryBlock or instances of SecureMemoryBlock and Strings.

The comparison operation itself is a constant-time binary comparison.

Clone this wiki locally