Interface Pkcs11PrivateKeyAccessor
- All Superinterfaces:
Pkcs11ObjectAccessor<PrivateKey>
- All Known Implementing Classes:
SunPkcs11PrivateKeyAccessor
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 TypeMethodDescriptionGets a reference to the private key from the PKCS#11 device, and throwsSecurityException
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 throwsSecurityException
if it can not be extracted or is not found.- Specified by:
get
in interfacePkcs11ObjectAccessor<PrivateKey>
- Parameters:
provider
- the security provider to usealias
- the alias to the entry holding the objectpin
- 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
-