Package de.christofreichardt.jca.shamir
Class ShamirsLoadParameter
- java.lang.Object
-
- de.christofreichardt.jca.shamir.ShamirsLoadParameter
-
- All Implemented Interfaces:
KeyStore.LoadStoreParameter
public class ShamirsLoadParameter extends Object implements KeyStore.LoadStoreParameter
Specifies how to load and store aKeyStoreinstance of typeShamirsKeystore.- Author:
- Christof Reichardt
-
-
Constructor Summary
Constructors Constructor Description ShamirsLoadParameter(File file, ShamirsProtection shamirsProtection)The givenFileobject denotes the location of a PKCS#12 keystore within the file system.ShamirsLoadParameter(InputStream inputStream, ShamirsProtection shamirsProtection)The givenInputStreamobject will be used to load a PKCS#12 keystore.ShamirsLoadParameter(OutputStream outputStream, ShamirsProtection shamirsProtection)The givenOutputStreamobject will be used to store a PKCS#12 keystore.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<File>getFile()Returns the KeyStore file if applicable, otherwise theOptionalis empty.Optional<InputStream>getInputStream()Returns theInputStreamproviding the data of the PKCS#12 keystore, if applicable.StringgetName()Returns the file name of the KeyStore if applicable, otherwise the string representation from the hashcode of the givenInputStreamorOutputStream.Optional<OutputStream>getOutputStream()Returns theOutputStreaminstance receiving the data of the PKCS#12 keystore, if applicable.KeyStore.ProtectionParametergetProtectionParameter()Returns theShamirsProtectioninstance used to protect the PKCS#12 keystore.
-
-
-
Constructor Detail
-
ShamirsLoadParameter
public ShamirsLoadParameter(File file, ShamirsProtection shamirsProtection)
The givenFileobject denotes the location of a PKCS#12 keystore within the file system.- Parameters:
file- a PKCS#12 keystoreshamirsProtection- the parameter used to protect keystore data
-
ShamirsLoadParameter
public ShamirsLoadParameter(InputStream inputStream, ShamirsProtection shamirsProtection)
The givenInputStreamobject will be used to load a PKCS#12 keystore.- Parameters:
inputStream- provides data to load a PKCS#12 keystoreshamirsProtection- the parameter used to protect keystore data
-
ShamirsLoadParameter
public ShamirsLoadParameter(OutputStream outputStream, ShamirsProtection shamirsProtection)
The givenOutputStreamobject will be used to store a PKCS#12 keystore.- Parameters:
outputStream- receives data to store a PKCS#12 keystoreshamirsProtection- the parameter used to protect keystore data
-
-
Method Detail
-
getProtectionParameter
public KeyStore.ProtectionParameter getProtectionParameter()
Returns theShamirsProtectioninstance used to protect the PKCS#12 keystore.- Specified by:
getProtectionParameterin interfaceKeyStore.LoadStoreParameter- Returns:
- the
ShamirsProtectioninstance
-
getFile
public Optional<File> getFile()
Returns the KeyStore file if applicable, otherwise theOptionalis empty.- Returns:
- an optional
Fileinstance
-
getName
public String getName()
Returns the file name of the KeyStore if applicable, otherwise the string representation from the hashcode of the givenInputStreamorOutputStream.- Returns:
- the file name of the KeyStore if applicable
-
getInputStream
public Optional<InputStream> getInputStream()
Returns theInputStreamproviding the data of the PKCS#12 keystore, if applicable.- Returns:
- an optional
InputStreaminstance
-
getOutputStream
public Optional<OutputStream> getOutputStream()
Returns theOutputStreaminstance receiving the data of the PKCS#12 keystore, if applicable.- Returns:
- an optional
OutputStreaminstance
-
-