public final class FilenameProfileWriter extends CredentialWriter
The following credential readers can all be used with this credential writer:
CredentialCreatorCredentialRecovererFilenameProfileReaderPKCS12ReaderStreamProfileReaderRoamingCredentialReaderBelow is an example of how a user's Digital Identity can be logged into and then written (all capitalized values must be provided by the user):
User user = new User(); JNDIDirectory directory = new JNDIDirectory(DIRECTORY_IP, DIRECTORY_PORT); ManagerTransport transport = new ManagerTransport(MANAGER_IP, MANAGER_PORT); user.setConnections(directory, transport); SecureStringBuffer securePassword = new SecureStringBuffer(PASSWORD); CredentialReader credentialReader = new FilenameProfileReader(EPF_FILE_NAME); CredentialWriter credentialWriter = new FilenameProfileWriter(EPF_FILE_NAME); user.setCredentialWriter(credentialWriter); user.login(credentialReader, securePassword); user.write();
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_HASH_COUNT
The default hash count; this is the number of iterations used by default
when deriving the Entrust Digital Identity protection key.
|
static java.lang.String |
DEFAULT_PROTECTION_ALGORITHM
The default EPF protection algorithm.
|
static int |
MINIMUM_HASH_COUNT
The minimum hash count; this is the minimum number of iterations allowed
when deriving the Entrust Digital Identity protection key.
|
| Constructor and Description |
|---|
FilenameProfileWriter(java.lang.String fileName)
Creates a
FilenameProfileWriter object. |
FilenameProfileWriter(java.lang.String fileName,
int hashCount)
Creates a
FilenameProfileWriter object. |
FilenameProfileWriter(java.lang.String fileName,
java.lang.String protectionAlgorithm,
int hashCount)
Deprecated.
use
FilenameProfileWriter(String, int)
Note, the protectionAlgorithm is no longer used by the toolkit. The protection
algorithm is read by using the Client Settings profile protection policy. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getType()
Returns the type (name) of this specific credential writer, which is
"FilenameProfileWriter".
|
addConfiguration, writePossiblepublic static final java.lang.String DEFAULT_PROTECTION_ALGORITHM
public static final int DEFAULT_HASH_COUNT
public static final int MINIMUM_HASH_COUNT
public FilenameProfileWriter(java.lang.String fileName)
FilenameProfileWriter object.
When used to create a credential writer that will be used for writing an
existing Entrust Digital Identity store that already contains EPF protection
values (read using a FilenameProfileReader or
StreamProfileReader), the EPF will be protected with the values
read from the EPF.
When used to create a credential writer that will be used for writing a
new Entrust Digital Identity (read using a CredentialCreator or
CredentialRecoverer) or an existing Entrust Digital Identity
store that does not contain EPF protection values (read using a
PKCS12Reader), the EPF is automatically
protected using the protection values specified by the Client Settings
profile protection policy. The has count is not required, and when missing
or zero, DEFAULT_HASH_COUNT) is automatically used.
fileName - the name of the EPF file where the user's Digital Identity will be
written (usually has a .epf filename extension)java.lang.IllegalArgumentException - thrown if any of the required parameters are null, or
fileName does not represent a file or represents a file
that cannot be written topublic FilenameProfileWriter(java.lang.String fileName,
java.lang.String protectionAlgorithm,
int hashCount)
FilenameProfileWriter(String, int)
Note, the protectionAlgorithm is no longer used by the toolkit. The protection
algorithm is read by using the Client Settings profile protection policy.fileName - the name of the EPF file where the user's Digital Identity will be
written (usually has a .epf filename extension)protectionAlgorithm - the algorithm used to protect the EPF; only the algorithms defined
in EntrustProfileProtectionAlgorithms are supported
(OPTIONAL)hashCount - the number of iterations used by when deriving the EPF protection key;
must be no less than MINIMUM_HASH_COUNT (OPTIONAL)java.lang.IllegalArgumentException - thrown if any of the required parameters are null,
fileName does not represent a file or represents a file
that cannot be written to, or the EPF protection parameters are invalidEntrustProfileProtectionAlgorithmspublic FilenameProfileWriter(java.lang.String fileName,
int hashCount)
FilenameProfileWriter object.
When used to create a credential writer that will be used for writing an
existing Entrust Digital Identity store that already contains EPF protection
values (read using a FilenameProfileReader or
StreamProfileReader), and the EPF protection values
(protectionAlgorithm, hashCount) are not set, the EPF will be protected with
the values read from the EPF.
When used to create a credential writer that will be used for writing a
new Entrust Digital Identity store (read using a
CredentialCreator or CredentialRecoverer) or an
existing Entrust Digital Identity store that does not contain EPF protection
values (read using a PKCS12Reader), the EPF is automatically
protected using the protection values specified by the Client Settings
profile protection policy. The has count is not required, and when missing
or zero, DEFAULT_HASH_COUNT) is automatically used.
fileName - the name of the EPF file where the user's Digital Identity will be
written (usually has a .epf filename extension)hashCount - the number of iterations used by when deriving the EPF protection key;
must be no less than MINIMUM_HASH_COUNT (OPTIONAL)java.lang.IllegalArgumentException - thrown if any of the required parameters are null,
fileName does not represent a file or represents a file
that cannot be written to, or the EPF protection parameters are invalidEntrustProfileProtectionAlgorithmspublic java.lang.String getType()
getType in class CredentialWriter