Class ByteExtensions
- java.lang.Object
-
- com.microsoft.azure.keyvault.cryptography.ByteExtensions
-
public final class ByteExtensions extends Object
-
-
Constructor Summary
Constructors Constructor Description ByteExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
clone(byte[] source)
Creates a copy of the source array.static byte[]
or(byte[] self, byte[] other)
static byte[]
or(byte[] self, byte[] other, int offset)
static boolean
sequenceEqualConstantTime(byte[] self, byte[] other)
Compares two byte arrays in constant time.static byte[]
xor(byte[] self, byte[] other)
static void
zero(byte[] self)
-
-
-
Method Detail
-
or
public static byte[] or(byte[] self, byte[] other)
-
or
public static byte[] or(byte[] self, byte[] other, int offset)
-
xor
public static byte[] xor(byte[] self, byte[] other)
-
zero
public static void zero(byte[] self)
-
sequenceEqualConstantTime
public static boolean sequenceEqualConstantTime(byte[] self, byte[] other)
Compares two byte arrays in constant time.- Parameters:
self
- The first byte array to compareother
- The second byte array to compare- Returns:
- True if the two byte arrays are equal.
-
clone
public static byte[] clone(byte[] source)
Creates a copy of the source array.- Parameters:
source
- Array to make copy of- Returns:
- A copy of the array, or null if source was null.
-
-