|
DigiStamp.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdgs.tlkt.ToolkitUtility
This class contains several "help functions" related to time stamp processing. All the methods are Statics.
| Field Summary | |
static java.lang.String |
DSG_SIG_POLICY1
|
static java.lang.String |
ID_CTI_ETS_PROOFOFAPPROVAL
The object identifier as a string for ID_CTI_ETS_PROOFOFAPPROVAL |
static java.lang.String |
ID_CTI_ETS_PROOFOFCREATION
The object identifier as a string for ID_CTI_ETS_PROOFOFCREATION |
static java.lang.String |
ID_CTI_ETS_PROOFOFORIGIN
The object identifier as a string for ID_CTI_ETS_PROOFOFORIGIN |
static java.lang.String |
ID_CTI_ETS_PROOFOFRECEIPT
The object identifier as a string for ID_CTI_ETS_PROOFOFRECEIPT |
static java.lang.String |
SHA_1
The object identifier as a string for SHA_1 |
| Method Summary | |
static byte[] |
base64Bytes(java.lang.String inString)
Create a base 64 string from input byte array |
static java.lang.String |
base64String(byte[] inBytes)
Create a base 64 string from input byte array |
static byte[] |
byteArrayAppend(byte[] b1,
byte[] b2)
Returns new byte array from concatenation of input |
static boolean |
byteArraysEqual(byte[] b1,
byte[] b2)
Are the two byte arrays equal? |
static java.lang.String |
byteArrayToString(byte[] in)
Byte array is returned as string - integers separated by comma |
static byte[] |
byteArrayTrim(byte[] in,
int length)
Trim the byte array to the specified length |
static byte[] |
byteCopy(byte[] in,
int from,
int to)
Copy of the byte array from the specified position to the given position |
static java.lang.String |
byteToHex02sString(byte[] digestBits)
Returns the byte array as a hex string separated by spaces |
static java.lang.String |
byteToHex04String(byte[] digestBits)
Returns the byte array as hex string ("0X" notation) |
static java.lang.String |
byteToString(byte[] digestBits)
Returns the byte array as a hex string |
static java.lang.String |
dateToGMTString(java.util.Date date)
Returns the data as a GMT string: "yyyy MM dd HH:mm:ss zz" |
static byte[] |
digestSHA1(byte[] yourData)
Only to be used on small byte arrays for testing purposes. |
static byte[] |
digestSHA1(java.io.InputStream in)
Only to be used on small byte arrays for testing purposes. |
static java.lang.String |
dNtoString(byte[] anEncodedName)
Given an ASN encoded x500 name, return a readable string of the name. |
static java.lang.String |
dNtoString(java.security.Principal aPrincipal)
Given a java.security.Principal, return a readable string of the name. |
static java.lang.String |
dNtoString(sun.security.x509.X500Name name)
Given a sun.security.x509.X500Name, return a readable name |
static java.lang.String |
encodeDNtoString(byte[] encodedDN)
Insert the method's description here. |
static java.lang.String |
getOidText(java.lang.String oid)
Translate OID values used in the toolkit to more human readable. |
static byte[] |
hexStringToByteArray(java.lang.String aString)
Given a hex string (format 2 with no spaces), convert to the byte array. |
static java.lang.String |
printTSInfo(CMSTsToken cms)
Display information contained in the time stamp. |
static byte[] |
readFile(java.io.File aFile)
Convenience method to read a file to a byte array. |
static byte[] |
readFile(java.lang.String fileName)
Convenience method to read a file to a byte array. |
static void |
writeToFile(java.io.File aFile,
byte[] bytesOut)
Convenience method to write a byte array to disk. |
static void |
writeToFile(java.lang.String fileName,
byte[] bytesOut)
Convenience method to write a byte array to disk. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static transient java.lang.String DSG_SIG_POLICY1
public static transient java.lang.String ID_CTI_ETS_PROOFOFAPPROVAL
ID_CTI_ETS_PROOFOFAPPROVAL
public static transient java.lang.String ID_CTI_ETS_PROOFOFCREATION
ID_CTI_ETS_PROOFOFCREATION
public static transient java.lang.String ID_CTI_ETS_PROOFOFORIGIN
ID_CTI_ETS_PROOFOFORIGIN
public static transient java.lang.String ID_CTI_ETS_PROOFOFRECEIPT
ID_CTI_ETS_PROOFOFRECEIPT
public static transient java.lang.String SHA_1
SHA_1
| Method Detail |
public static byte[] base64Bytes(java.lang.String inString)
inString - byte[]
public static java.lang.String base64String(byte[] inBytes)
inBytes - byte[]
public static byte[] byteArrayAppend(byte[] b1,
byte[] b2)
b1 - byte[]b2 - byte[]
public static boolean byteArraysEqual(byte[] b1,
byte[] b2)
b1 - byte[]b2 - byte[]
public static java.lang.String byteArrayToString(byte[] in)
in - byte[]
public static byte[] byteArrayTrim(byte[] in,
int length)
in - byte[]
public static byte[] byteCopy(byte[] in,
int from,
int to)
in - byte[]from - intto - int exclusive
public static java.lang.String byteToHex02sString(byte[] digestBits)
digestBits - byte[]
public static java.lang.String byteToHex04String(byte[] digestBits)
digestBits - byte[]
this same method is in serverProxy package
public static java.lang.String byteToString(byte[] digestBits)
digestBits - byte[]
this same method is in serverProxy package
public static java.lang.String dateToGMTString(java.util.Date date)
date - Date
public static byte[] digestSHA1(byte[] yourData)
yourData - byte[]
public static byte[] digestSHA1(java.io.InputStream in)
throws java.io.IOException
in - InputStream
java.io.IOExceptionpublic static java.lang.String dNtoString(byte[] anEncodedName)
anEncodedName - byte[]public static java.lang.String dNtoString(java.security.Principal aPrincipal)
aPrincipal - Principalpublic static java.lang.String dNtoString(sun.security.x509.X500Name name)
name - X500Namepublic static java.lang.String encodeDNtoString(byte[] encodedDN)
encodedDN - byte[]public static java.lang.String getOidText(java.lang.String oid)
oid - java.lang.String
public static byte[] hexStringToByteArray(java.lang.String aString)
throws java.lang.NumberFormatException
aString - java.lang.String
java.lang.NumberFormatExceptionpublic static java.lang.String printTSInfo(CMSTsToken cms)
public static byte[] readFile(java.io.File aFile)
aFile - Filepublic static byte[] readFile(java.lang.String fileName)
fileName - java.lang.String
public static void writeToFile(java.io.File aFile,
byte[] bytesOut)
aFile - FilebytesOut - byte[]
public static void writeToFile(java.lang.String fileName,
byte[] bytesOut)
fileName - java.lang.StringbytesOut - byte[]
|
Copyright 2000-2010 DigiStamp, Inc. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||