public class ConstantTimeComparison extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEqual(byte[] a,
byte[] b)
A constant time comparison implementation of isEqual.
|
static boolean |
isEqual(String a,
String b)
A constant time comparison implementation of isEqual.
|
public static boolean isEqual(byte[] a,
byte[] b)
throws NullPointerException
a - a byte [] to compare.b - another byte [] to compare.NullPointerException - if either a or b are null.public static boolean isEqual(String a, String b) throws NullPointerException
a - a String to compare.b - another String to compare.NullPointerException - if either a or b are null.Copyright © 2017 Atlassian. All rights reserved.