JwtArrayUtils

pdi.jwt.JwtArrayUtils$

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

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

Attributes

expected

first array

supplied

second array

Returns:

true if arrays equal, false otherwise.