|
IAIK PKCS#11 Wrapper version 1.2.16 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiaik.pkcs.pkcs11.wrapper.Functions
This class contains onyl static methods. It is the place for all functions that are used by several classes in this package.
Field Summary | |
protected static Hashtable |
digestMechanisms_
This table contains the mechanisms that are digest mechanisms. |
protected static Hashtable |
fullEncryptDecryptMechanisms_
This table contains the mechanisms that are full encrypt/decrypt mechanisms; i.e. mechanisms that support the update functoins. |
protected static Hashtable |
fullSignVerifyMechanisms_
This table contains the mechanisms that are full sign/verify mechanisms; i.e. mechanisms that support the update functoins. |
protected static char[] |
HEX_DIGITS
For converting numbers to their hex presentation. |
protected static Hashtable |
keyDerivationMechanisms_
This table contains the mechanisms that are key derivation mechanisms. |
protected static Hashtable |
keyGenerationMechanisms_
This table contains the mechanisms that key generation mechanisms; i.e. |
protected static Hashtable |
keyPairGenerationMechanisms_
This table contains the mechanisms that key-pair generation mechanisms; i.e. mechanisms for generating key-pairs. |
protected static Hashtable |
mechansimNames_
Maps mechanism codes as Long to their names as Strings. |
protected static Hashtable |
signVerifyRecoverMechanisms_
This table contains the mechanisms that are sign/verify mechanisms with message recovery. |
protected static Hashtable |
singleOperationEncryptDecryptMechanisms_
This table contains the mechanisms that are single-operation encrypt/decrypt mechanisms; i.e. mechanisms that do not support the update functoins. |
protected static Hashtable |
singleOperationSignVerifyMechanisms_
This table contains the mechanisms that are single-operation sign/verify mechanisms; i.e. mechanisms that do not support the update functoins. |
protected static Hashtable |
wrapUnwrapMechanisms_
This table contains the mechanisms that are wrap/unwrap mechanisms. |
Constructor Summary | |
Functions()
|
Method Summary | |
static String |
classTypeToString(long classType)
Converts the long value classType to a string representation of it. |
static boolean |
equals(byte[] array1,
byte[] array2)
Check the given arrays for equalitiy. |
static boolean |
equals(char[] array1,
char[] array2)
Check the given arrays for equalitiy. |
static boolean |
equals(CK_DATE date1,
CK_DATE date2)
Check the given dates for equalitiy. |
static int |
hashCode(byte[] array)
Calculate a hash code for the given byte array. |
static int |
hashCode(char[] array)
Calculate a hash code for the given char array. |
static int |
hashCode(CK_DATE date)
Calculate a hash code for the given date object. |
static boolean |
isDigestMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a digest mechanism. |
static boolean |
isFullEncryptDecryptMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a full encrypt/decrypt mechanism; i.e. it supports the encryptUpdate() and decryptUpdate() functions. |
static boolean |
isFullSignVerifyMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a full sign/verify mechanism; i.e. it supports the signUpdate() and verifyUpdate() functions. |
static boolean |
isKeyDerivationMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a key derivation mechanism. |
static boolean |
isKeyGenerationMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a key generation mechanism for generating symmetric keys. |
static boolean |
isKeyPairGenerationMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a key-pair generation mechanism for generating key-pairs. |
static boolean |
isSignVerifyRecoverMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a sign/verify mechanism with message recovery. |
static boolean |
isSingleOperationEncryptDecryptMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a single-operation encrypt/decrypt mechanism; i.e. it does not support the encryptUpdate() and decryptUpdate() functions. |
static boolean |
isSingleOperationSignVerifyMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a single-operation sign/verify mechanism; i.e. it does not support the signUpdate() and encryptUpdate() functions. |
static boolean |
isWrapUnwrapMechanism(long mechanismCode)
This method checks, if the mechanism with the given code is a wrap/unwrap mechanism; i.e. it supports the wrapKey() and unwrapKey() functions. |
static String |
mechanismCodeToString(long mechansimCode)
Converts the long value code of a mechanism to a name. |
static String |
mechanismInfoFlagsToString(long flags)
Converts the long value flags to a MechanismInfoFlag string. |
static String |
sessionInfoFlagsToString(long flags)
Converts the long value flags to a SessionInfoFlag string. |
static String |
sessionStateToString(long state)
Converts the long value state to a SessionState string. |
static String |
slotInfoFlagsToString(long flags)
Converts the long value flags to a SlotInfoFlag string. |
static String |
toBinaryString(byte[] value)
Converts a byte array to a binary String. |
static String |
toBinaryString(long value)
Converts a long value to a binary String. |
static String |
toFullHexString(int value)
Converts a int value to a hexadecimal String of length 8. |
static String |
toFullHexString(long value)
Converts a long value to a hexadecimal String of length 16. |
static String |
toHexString(byte[] value)
Converts a byte array to a hexadecimal String. |
static String |
toHexString(long value)
Converts a long value to a hexadecimal String. |
static String |
tokenInfoFlagsToString(long flags)
Converts long value flags to a TokenInfoFlag string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static Hashtable mechansimNames_
protected static Hashtable fullEncryptDecryptMechanisms_
protected static Hashtable singleOperationEncryptDecryptMechanisms_
protected static Hashtable fullSignVerifyMechanisms_
protected static Hashtable singleOperationSignVerifyMechanisms_
protected static Hashtable signVerifyRecoverMechanisms_
protected static Hashtable digestMechanisms_
protected static Hashtable keyGenerationMechanisms_
protected static Hashtable keyPairGenerationMechanisms_
protected static Hashtable wrapUnwrapMechanisms_
protected static Hashtable keyDerivationMechanisms_
protected static final char[] HEX_DIGITS
Constructor Detail |
public Functions()
Method Detail |
public static String toFullHexString(long value)
value
- The long value to be converted.
public static String toFullHexString(int value)
value
- The int value to be converted.
public static String toHexString(long value)
value
- The long value to be converted.
public static String toHexString(byte[] value)
value
- the byte array to be converted
public static String toBinaryString(long value)
value
- the long value to be converted.
public static String toBinaryString(byte[] value)
value
- The byte array to be converted.
public static String slotInfoFlagsToString(long flags)
flags
- The flags to be converted.
public static String tokenInfoFlagsToString(long flags)
flags
- The flags to be converted.
public static String sessionInfoFlagsToString(long flags)
flags
- The flags to be converted.
public static String sessionStateToString(long state)
state
- The state to be converted.
public static String mechanismInfoFlagsToString(long flags)
flags
- The flags to be converted to a string representation.
public static String mechanismCodeToString(long mechansimCode)
mechansimCode
- The code of the mechanism to be converted to a string.
public static String classTypeToString(long classType)
classType
- The classType to be converted.
public static boolean equals(byte[] array1, byte[] array2)
null
or both have the same length and
contain exactly the same byte values.
array1
- The first array.array2
- The second array.
null
or both have the same
length and contain exactly the same byte values. False, otherwise.public static boolean equals(char[] array1, char[] array2)
null
or both have the same length and
contain exactly the same char values.
array1
- The first array.array2
- The second array.
null
or both have the same
length and contain exactly the same char values. False, otherwise.public static boolean equals(CK_DATE date1, CK_DATE date2)
null
or both contain exactly the same char
values.
date1
- The first date.date2
- The second date.
null
or both contain the same
char values. False, otherwise.public static int hashCode(byte[] array)
array
- The byte array.
public static int hashCode(char[] array)
array
- The char array.
public static int hashCode(CK_DATE date)
date
- The date object.
public static boolean isFullEncryptDecryptMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isSingleOperationEncryptDecryptMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isFullSignVerifyMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isSingleOperationSignVerifyMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isSignVerifyRecoverMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isDigestMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isKeyGenerationMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isKeyPairGenerationMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isWrapUnwrapMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
public static boolean isKeyDerivationMechanism(long mechanismCode)
mechanismCode
- The code of the mechanism to check.
|
IAIK PKCS#11 Wrapper version 1.2.16 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |