Package com.nimbusds.jose.crypto.utils
Class ConstantTimeUtils
java.lang.Object
com.nimbusds.jose.crypto.utils.ConstantTimeUtils
Array utilities.
- Version:
- 2017-04-26
- Author:
- Vladimir Dzhuvinov
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areEqual
(byte[] a, byte[] b) Checks the specified arrays for equality in constant time.
-
Method Details
-
areEqual
Checks the specified arrays for equality in constant time. Intended to mitigate timing attacks.- Parameters:
a
- The first array. Must not benull
.b
- The second array. Must not benull
.- Returns:
true
if the two arrays are equal, elsefalse
.
-