public class Util
extends java.lang.Object
| Constructor and Description |
|---|
Util() |
| Modifier and Type | Method and Description |
|---|---|
static CK_ATTRIBUTE[] |
convertAttributesVectorToArray(java.util.Vector attributes)
Converts the given vector into an array of CK_ATTRIBUTE elements.
|
static CK_DATE |
convertToCkDate(java.util.Date date)
Convert the given Date object to a CK_DATE object.
|
static java.util.Date |
convertToDate(CK_DATE ckDate)
Convert the given CK_DATE object to a Date object.
|
static java.util.Date |
parseTime(char[] timeChars)
Parse a time character array as defined in PKCS#11 and return is as a Date object.
|
static char[] |
toCharArray(int number,
int exactArrayLength)
Converts the given number into a char-array.
|
static char[] |
toPaddedCharArray(java.lang.String string,
int exactArrayLength,
char paddingChar)
Converts the given string to a char-array of exactly the given length.
|
static byte[] |
unsignedBigIntergerToByteArray(java.math.BigInteger bigInteger)
Convert a BigInteger to a byte-array, but treat the byte-array given from the BigInteger as
unsigned and removing any leading zero bytes; e.g.
|
public static java.util.Date parseTime(char[] timeChars)
timeChars - A time encoded as character array as specified in PKCS#11.public static java.util.Date convertToDate(CK_DATE ckDate)
ckDate - The object providing the date information.public static CK_DATE convertToCkDate(java.util.Date date)
date - The object providing the date information.public static char[] toCharArray(int number,
int exactArrayLength)
number - The number to convert to a char array.exactArrayLength - The exact length of the returned array.public static char[] toPaddedCharArray(java.lang.String string,
int exactArrayLength,
char paddingChar)
string - The string to convert.exactArrayLength - The length of the retirned char-array.paddingChar - The character to use for padding, if necessary.public static byte[] unsignedBigIntergerToByteArray(java.math.BigInteger bigInteger)
bigInteger - The BigInteger to convert.public static CK_ATTRIBUTE[] convertAttributesVectorToArray(java.util.Vector attributes)
attributes - The vector which contains the attributes.IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.6.9