Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.jce.provider.util
Class Util  view Util download Util.java

java.lang.Object
  extended bycryptix.jce.provider.util.Util

public final class Util
extends java.lang.Object

Misc utility methods.

Version:
$Revision: 1.3 $

Field Summary
static java.math.BigInteger BI_ONE
           
static java.math.BigInteger BI_ZERO
           
 
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
 

Field Detail

BI_ZERO

public static final java.math.BigInteger BI_ZERO

BI_ONE

public static final java.math.BigInteger BI_ONE
Constructor Detail

Util

private Util()
Method Detail

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.