Skip to content

libsodium.CompareNonce

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

libsodium.CompareNonce

Method Signature

 Protected Function CompareNonce(Nonce1 As MemoryBlock, Nonce2 As MemoryBlock) As Int32

Parameters

Name Type Comment
Nonce1 MemoryBlock The nonce to compare to Nonce2
Nonce2 MemoryBlock The nonce to compare to Nonce1

Return value

Returns 0 if the nonces are equal, +1 if Nonce1 is greater, or -1 if Nonce2 is greater.

Remarks

This method compares Nonce1 to Nonce2 in constant time.

See also

Clone this wiki locally