JwtArrayUtils

pdi.jwt.JwtArrayUtils$
object JwtArrayUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def constantTimeAreEqual(expected: Array[Byte], supplied: Array[Byte]): Boolean

A constant time equals comparison - does not terminate early if test will fail. For best results always pass the expected value as the first parameter.

A constant time equals comparison - does not terminate early if test will fail. For best results always pass the expected value as the first parameter.

Ported from BouncyCastle to remove the need for a runtime dependency. https://github.com/bcgit/bc-java/blob/290df7b4edfc77b32d55d0a329bf15ef5b98733b/core/src/main/java/org/bouncycastle/util/Arrays.java#L136-L172

Value parameters

expected

first array

supplied

second array

Attributes

Returns

true if arrays equal, false otherwise.