Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper Demo version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## demo.pkcs.pkcs11
Class TokenPrivateKey

    java.lang.Object
      demo.pkcs.pkcs11.TokenPrivateKey

All Implemented Interfaces:
  Key, PrivateKey, Serializable

public class TokenPrivateKey
extends Object
implements PrivateKey

This is an adapter class that allows to use token keys as JCA private keys. An application can use this class whereever an interface requires the application to pass an JCA private key; e.g. for signing.

See Also:
  Serialized Form
Invariants

Field Summary
`protected PrivateKey` | `tokenPrivateKey_` The PKCS#11 private key of this object.

Fields inherited from interface java.security.PrivateKey
`serialVersionUID`

Constructor Summary
`TokenPrivateKey(PrivateKey tokenPrivateKey)` Create a new JCA private key that uses the given PKCS#11 private key internally.

Method Summary
`String` | `getAlgorithm()` Just returns null.
`byte[]` | `getEncoded()` Just returns null.
`String` | `getFormat()` Just returns null.
`PrivateKey` | `getTokenPrivateKey()` Returns the PKCS#11 private key object that this object refers to.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### tokenPrivateKey_

    protected PrivateKey tokenPrivateKey_

  The PKCS#11 private key of this object.

Constructor Detail

### TokenPrivateKey

    public TokenPrivateKey(PrivateKey tokenPrivateKey)

  Create a new JCA private key that uses the given PKCS#11 private key internally.

Parameters:
  `tokenPrivateKey` - The PKCS#11 private key that this object refers to.
Preconditions
Postconditions

Method Detail

### getAlgorithm

    public String getAlgorithm()

  Just returns null.

  Specified by:
    `getAlgorithm` in interface `Key`
  Returns:
    null.
  Preconditions
  Postconditions
    (result == null)

### getFormat

    public String getFormat()

  Just returns null.

  Specified by:
    `getFormat` in interface `Key`
  Returns:
    null.
  Preconditions
  Postconditions
    (result == null)

### getEncoded

    public byte[] getEncoded()

  Just returns null.

  Specified by:
    `getEncoded` in interface `Key`
  Returns:
    null.
  Preconditions
  Postconditions
    (result == null)

### getTokenPrivateKey

    public PrivateKey getTokenPrivateKey()

  Returns the PKCS#11 private key object that this object refers to.

  Returns:
    The KCS#11 private key object that this object refers to.
  Preconditions
  Postconditions

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper Demo version 1.2.16
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2002, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.