IAIK PKCS#11 Provider API Documentation
version 1.6

iaik.pkcs.pkcs11.provider.keyfactories
Class PKCS11KeySpec

java.lang.Object
  extended by iaik.pkcs.pkcs11.provider.spec.PKCS11Spec
      extended by iaik.pkcs.pkcs11.provider.keyfactories.PKCS11KeySpec
All Implemented Interfaces:
java.security.spec.KeySpec

public class PKCS11KeySpec
extends PKCS11Spec

This is a key specification object. It carries the actual key spec and additional data needed for PKCS#11.

Author:
Karl Scheibelhofer

Field Summary
 
Fields inherited from class iaik.pkcs.pkcs11.provider.spec.PKCS11Spec
USE_PUBLIC_SESSION, USE_READ_ONLY_SESSION, USE_READ_WRITE_SESSION, USE_USER_SESSION
 
Constructor Summary
PKCS11KeySpec(java.security.spec.KeySpec keySpec, iaik.pkcs.pkcs11.objects.Object keyTemplate)
          Constructor taking several parameters that control where and how the key should be generated.
PKCS11KeySpec(java.security.spec.KeySpec keySpec, TokenManager tokenManager, iaik.pkcs.pkcs11.objects.Object keyTemplate, boolean useROSession, boolean useUserSession)
          Deprecated.  
 
Method Summary
 java.security.spec.KeySpec getKeySpec()
          Get the actual key spec for the new key.
 iaik.pkcs.pkcs11.objects.Object getKeyTemplate()
          Get the template for the new key.
 
Methods inherited from class iaik.pkcs.pkcs11.provider.spec.PKCS11Spec
getPin, getTokenManager, isUseAnonymousRole, isUseROSession, isUseRwSession, isUseSORole, isUseUserRole, isUseUserSession, setPin, setTokenManager, setUseAnonymousRole, setUseSORole, setUseUserRole
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PKCS11KeySpec

public PKCS11KeySpec(java.security.spec.KeySpec keySpec,
                     TokenManager tokenManager,
                     iaik.pkcs.pkcs11.objects.Object keyTemplate,
                     boolean useROSession,
                     boolean useUserSession)
Deprecated. 

Constructor taking several parameters that control where and how the key should be generated.

Parameters:
keySpec - The actual key spec to use.
tokenManager - The manager to handle the token to generate the key on.
keyTemplate - The template for the new key.
useROSession - true (USE_READ_ONLY_SESSION), if the key should be generated using a read-only session. This is only possible for session-objects. false ( USE_READ_WRITE_SESSION) to use a read-write session.
useUserSession - true (USE_USER_SESSION), if the key should be generated using a user session. This is required for private objects (key); i.e. keys that have their private flag set. false (USE_PUBLIC_SESSION) to use a public session. This will only work for public objects.

PKCS11KeySpec

public PKCS11KeySpec(java.security.spec.KeySpec keySpec,
                     iaik.pkcs.pkcs11.objects.Object keyTemplate)
Constructor taking several parameters that control where and how the key should be generated.

Parameters:
keySpec - The actual key spec to use.
keyTemplate - The template for the new key.
Method Detail

getKeySpec

public java.security.spec.KeySpec getKeySpec()
Get the actual key spec for the new key.

Returns:
The spec for the new key.

getKeyTemplate

public iaik.pkcs.pkcs11.objects.Object getKeyTemplate()
Get the template for the new key.

Returns:
The template for the new key.

IAIK PKCS#11 Provider API Documentation
version 1.6

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.
version 1.6