java.lang.Object
cryptix.jce.provider.util.Util
- public final class Util
- extends java.lang.Object
Misc utility methods.
- Version:
- $Revision: 1.3 $
Constructor Summary |
private |
Util()
|
Method Summary |
static boolean |
equals(byte[] a,
byte[] b)
Compare two byte[] for equality. |
static byte[] |
toFixedLenByteArray(java.math.BigInteger x,
int resultByteLen)
Fit (stretch or shrink) the given positive BigInteger into a
byte[] of resultByteLen bytes without losing precision. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BI_ZERO
public static final java.math.BigInteger BI_ZERO
BI_ONE
public static final java.math.BigInteger BI_ONE
Util
private Util()
toFixedLenByteArray
public static byte[] toFixedLenByteArray(java.math.BigInteger x,
int resultByteLen)
- Fit (stretch or shrink) the given positive BigInteger into a
byte[] of resultByteLen bytes without losing precision.
equals
public static boolean equals(byte[] a,
byte[] b)
- Compare two byte[] for equality. byte[]s are considered equal if they
have the same length and the same contents (same elems, same order).
Additionally, two null arguments compare equal too.