Interface Pkcs11PrivateKeyAccessor

All Superinterfaces:
Pkcs11ObjectAccessor<PrivateKey>
All Known Implementing Classes:
SunPkcs11PrivateKeyAccessor

public interface Pkcs11PrivateKeyAccessor extends Pkcs11ObjectAccessor<PrivateKey>
A functional interface for getting a reference to a private key residing on a PKCS#11 device.
Author:
Martin Lindström
  • Method Summary

    Modifier and Type
    Method
    Description
    get(Provider provider, String alias, char[] pin)
    Gets a reference to the private key from the PKCS#11 device, and throws SecurityException if it can not be extracted or is not found.
  • Method Details

    • get

      @Nonnull PrivateKey get(@Nonnull Provider provider, @Nonnull String alias, @Nonnull char[] pin) throws SecurityException
      Gets a reference to the private key from the PKCS#11 device, and throws SecurityException if it can not be extracted or is not found.
      Specified by:
      get in interface Pkcs11ObjectAccessor<PrivateKey>
      Parameters:
      provider - the security provider to use
      alias - the alias to the entry holding the object
      pin - the PIN needed to access the entry
      Returns:
      an object reference or null if the object is not available
      Throws:
      SecurityException - if the operation is not successful