Skip to content

libsodium.Password.Operator_Compare

Andrew Lambert edited this page Nov 26, 2022 · 5 revisions

libsodium.Password.Operator_Compare

Method Signatures

 Function Operator_Compare(OtherPassword As libsodium.Password) As Int32
 Function Operator_Compare(OtherPassword As String) As Int32

Parameters

Name Type Comment
OtherPassword Password The Password to compare to Self.
OtherPassword String The password string to compare to Self.

Return value

This method returns 0 if OtherPassword and Self are identical.

Remarks

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

The comparison operation itself is a constant-time binary comparison of password strings.

Clone this wiki locally