nl.warper.skein
Class Util

java.lang.Object
  extended by nl.warper.skein.Util

public final class Util
extends java.lang.Object

Some utilities and constants that may be usefull.

Since:
5 nov 2008
Version:
$Revision: $
Author:
maartenb, $Author: $

Field Summary
static int BYTES_IN_LONG
           
 
Method Summary
static byte[] fromhex(java.lang.String hex)
           
static byte[] lsbArrayOfLongToBytes(long[] la)
           
static long[] lsbBytesToArrayOfLong(byte[] ba)
           
static long lsbBytesToLong(byte[] ba)
           
static byte[] lsbLongToBytes(long l)
           
static void printRound(int d, long[] values)
           
static java.lang.String toFormattedHex(byte[] bytes, int tabs)
           
static java.lang.String tohex(byte[] bytes)
           
static java.lang.String tohex(long[] longs)
           
static byte[] zeroPad(byte[] data, int blockSize)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BYTES_IN_LONG

public static final int BYTES_IN_LONG
See Also:
Constant Field Values
Method Detail

lsbBytesToLong

public static long lsbBytesToLong(byte[] ba)

lsbLongToBytes

public static byte[] lsbLongToBytes(long l)

lsbBytesToArrayOfLong

public static long[] lsbBytesToArrayOfLong(byte[] ba)

lsbArrayOfLongToBytes

public static byte[] lsbArrayOfLongToBytes(long[] la)

zeroPad

public static byte[] zeroPad(byte[] data,
                             int blockSize)

tohex

public static java.lang.String tohex(byte[] bytes)

toFormattedHex

public static java.lang.String toFormattedHex(byte[] bytes,
                                              int tabs)

fromhex

public static byte[] fromhex(java.lang.String hex)

tohex

public static java.lang.String tohex(long[] longs)

printRound

public static void printRound(int d,
                              long[] values)