@Mutable @ThreadSafety(level=NOT_THREADSAFE) public final class PKCS8EncryptionProperties extends java.lang.Object implements java.io.Serializable
Constructor and Description |
---|
PKCS8EncryptionProperties()
Creates a set of PKCS #8 encryption properties with the default settings.
|
Modifier and Type | Method and Description |
---|---|
PKCS5AlgorithmIdentifier |
getCipherTransformationAlgorithm()
Retrieves the algorithm identifier for the cipher transformation to use
when encrypting a PKCS #8 private key.
|
int |
getKeyFactoryIterationCount()
Retrieves the iteration count to use when generating the encryption key
from the provided password.
|
PKCS5AlgorithmIdentifier |
getKeyFactoryPRFAlgorithm()
Retrieves the algorithm identifier for the pseudorandom function to use for
the key factory when generating the encryption key from the provided
password.
|
int |
getKeyFactorySaltLengthBytes()
Retrieves the length in bytes to use for the key factory salt when
generating the encryption key from the provided password.
|
void |
setCipherTransformationAlgorithm(PKCS5AlgorithmIdentifier cipherTransformationAlgorithm)
Specifies the algorithm identifier for the cipher transformation to use
when encrypting a PKCS #8 private key.
|
void |
setKeyFactoryIterationCount(int keyFactoryIterationCount)
Specifies the iteration count to use when generating the encryption key
from the provided password.
|
void |
setKeyFactoryPRFAlgorithm(PKCS5AlgorithmIdentifier keyFactoryPRFAlgorithm)
Specifies the algorithm identifier for the pseudorandom function to use
when generating the encryption key from the provided password.
|
void |
setKeyFactorySaltLengthBytes(int keyFactorySaltLengthBytes)
Specifies the length in bytes to use for the key factory salt when
generating the encryption key from the provided password.
|
java.lang.String |
toString()
Retrieves a string representation of the PKCS #8 encryption properties.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of the PKCS #8 encryption properties to the
provided buffer.
|
public PKCS8EncryptionProperties()
@NotNull public PKCS5AlgorithmIdentifier getKeyFactoryPRFAlgorithm()
public void setKeyFactoryPRFAlgorithm(@NotNull PKCS5AlgorithmIdentifier keyFactoryPRFAlgorithm) throws CertException
keyFactoryPRFAlgorithm
- The algorithm identifier for the
pseudorandom function to use when
generating the encryption key from the
provided password. It must not be
null
, and it must represent a valid
pseudorandom function.CertException
- If the provided algorithm identifier does not
represent a valid pseudorandom function.public int getKeyFactoryIterationCount()
public void setKeyFactoryIterationCount(int keyFactoryIterationCount)
keyFactoryIterationCount
- The iteration count to use when
generating the encryption key from the
provided password. It must be greater
than zero.public int getKeyFactorySaltLengthBytes()
public void setKeyFactorySaltLengthBytes(int keyFactorySaltLengthBytes)
keyFactorySaltLengthBytes
- The length in bytes to use for the key
factory salt when generating the
encryption key from the provided
password. It must be greater than zero.@NotNull public PKCS5AlgorithmIdentifier getCipherTransformationAlgorithm()
public void setCipherTransformationAlgorithm(@NotNull PKCS5AlgorithmIdentifier cipherTransformationAlgorithm) throws CertException
cipherTransformationAlgorithm
- The algorithm identifier for the
cipher transformation to use when
encrypting a PKCS #8 private key.
It must not be null
, and it
must represent a valid cipher
transformation.CertException
- If the provided algorithm identifier does not
represent a valid cipher transformation.@NotNull public java.lang.String toString()
toString
in class java.lang.Object