|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.security.Identity
|
+--java.security.IdentityScope
|
+--com.ibm.crypto.fips.provider.IdentityDatabase
An implementation of IdentityScope as a persistent identity database.
Identity,
Key, Serialized Form| Constructor Summary | |
|---|---|
IdentityDatabase(java.io.File file)
Construct a new, empty database with a specified source file. |
|
IdentityDatabase(java.lang.String name)
Construct a new, empty database. |
|
| Method Summary | |
|---|---|
void |
addIdentity(java.security.Identity identity)
Adds an identity to the database. |
static IdentityDatabase |
fromFile(java.io.File f)
Initialize an IdentityDatabase from file. |
static IdentityDatabase |
fromStream(java.io.InputStream is)
Initialize an identity database from a stream. |
java.security.Identity |
getIdentity(java.security.PublicKey key)
Get an identity by key. |
java.security.Identity |
getIdentity(java.lang.String name)
|
java.util.Enumeration |
identities()
|
boolean |
isFipsApproved()
Module identifies if the cryptographic operation (algorithm) is FIPS certified |
void |
removeIdentity(java.security.Identity identity)
Removes an identity to the database. |
void |
save()
Saves the database to the default source file. |
void |
save(java.io.OutputStream os)
Save the database in its current state to an output stream. |
int |
size()
|
java.lang.String |
toString()
|
| Methods inherited from class java.security.IdentityScope |
|---|
getIdentity, getSystemScope, setSystemScope |
| Methods inherited from class java.security.Identity |
|---|
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public IdentityDatabase(java.io.File file)
throws java.security.InvalidParameterException
file - the source file.
public IdentityDatabase(java.lang.String name)
throws java.security.InvalidParameterException
| Method Detail |
public boolean isFipsApproved()
AlgorithmStatusisFipsApproved in interface AlgorithmStatusAlgorithmStatus.isFipsApproved()
public static IdentityDatabase fromStream(java.io.InputStream is)
throws java.io.IOException
is - the input stream from which to restore the database.java.io.IOException - if a stream IO exception occursFIPSRuntimeException - if SelfTest.isFipsRunnable returns false.
public static IdentityDatabase fromFile(java.io.File f)
throws java.io.IOException
f - the filename where the identity database is stored.java.io.IOException - a file-related exception occurs (e.g.
the directory of the file passed does not exists, etc.FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.public int size()
size in class java.security.IdentityScopeFIPSRuntimeException - if SelfTest.isFipsRunnable returns false.public java.security.Identity getIdentity(java.lang.String name)
getIdentity in class java.security.IdentityScopename - the name of the identity to be retrieved.FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.public java.security.Identity getIdentity(java.security.PublicKey key)
getIdentity in class java.security.IdentityScopename - the key of the identity to be retrieved.FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.
public void addIdentity(java.security.Identity identity)
throws java.security.KeyManagementException
addIdentity in class java.security.IdentityScopeidentity - the identity to be added.java.security.KeyManagementException - if a name or key clash
occurs, or if another exception occurs.FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.
public void removeIdentity(java.security.Identity identity)
throws java.security.KeyManagementException
removeIdentity in class java.security.IdentityScopeFIPSRuntimeException - if SelfTest.isFipsRunnable returns false.public java.util.Enumeration identities()
identities in class java.security.IdentityScopeFIPSRuntimeException - if SelfTest.isFipsRunnable returns false.
public void save(java.io.OutputStream os)
throws java.io.IOException
os - the output stream to which the database should be serialized.java.io.IOException - if an IO exception is raised by stream
operations.FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.
public void save()
throws java.io.IOException
java.io.IOException - when there is no default source
file specified for this database.FIPSRuntimeException - if SelfTest.isFipsRunnable returns false.public java.lang.String toString()
toString in class java.security.IdentityScopeFIPSRuntimeException - if SelfTest.isFipsRunnable returns false.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||