    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class w3c.www.dsig.DSigUtil

    java.lang.Object
       |
       +----w3c.www.dsig.DSigUtil

public class DSigUtil
extends Object

Some random utilities used for DSig

##

DEBUG

##

DSigUtil()

##

base64ToBigInteger(String)
  Decode a Base 64 encoded BigInteger.
base64ToByteArray(String)
  Returns a byte array representatino of a base64 string.
bigIntegerToBase64(BigInteger)
  Encode a BigInteger in Base 64 encoding.
byteArrayToBase64(byte[])
dictionaryToVector(Dictionary)
  Returns a vector form of a dictionary
printHexDump(byte[])
  Print a hexdump of the given byte array.
readln(String, String)
  Reads a string from the user.
toString(Object)
  Produces a string representation of an s-expression.
waitKey()
  Wait for user to press a key

##

DEBUG

     public static boolean DEBUG

##

DSigUtil

     public DSigUtil()

##

waitKey

     public static void waitKey()

  Wait for user to press a key

bigIntegerToBase64

     public static String bigIntegerToBase64(BigInteger bi)

  Encode a BigInteger in Base 64 encoding. Included here as signature suite implementations will frequently need it.

base64ToBigInteger

     public static BigInteger base64ToBigInteger(String b64)

  Decode a Base 64 encoded BigInteger. Return the BigInteger object or null if the input was not properly encoded. Included here as signature suite implementations will frequently need it.

byteArrayToBase64

     public static String byteArrayToBase64(byte bytes[])

base64ToByteArray

     public static byte[] base64ToByteArray(String s) throws DSigException

  Returns a byte array representatino of a base64 string.

  Throws: DSigException
    if the String is a valid base64 String.

dictionaryToVector

     public static Vector dictionaryToVector(Dictionary dict)

  Returns a vector form of a dictionary

readln

     public static String readln(String msg,
                                 String def)

  Reads a string from the user. `msg` is the question displayed to the user, and `def` if the default answer if the user simply press return key.

toString

     public static String toString(Object exp)

  Produces a string representation of an s-expression.

printHexDump

     public static void printHexDump(byte data[])

  Print a hexdump of the given byte array. Remainder from debugging.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index