|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.security.Identity
java.security.IdentityScope
com.ibm.crypto.provider.IdentityDatabase
An implementation of IdentityScope as a persistent identity database.
Identity,
Key,
Serialized Form| Constructor Summary | |
|---|---|
IdentityDatabase(File file)
Construct a new, empty database with a specified source file. |
|
IdentityDatabase(String name)
Construct a new, empty database. |
|
| Method Summary | |
|---|---|
void |
addIdentity(Identity identity)
Adds an identity to the database. |
static IdentityDatabase |
fromFile(File f)
Initialize an IdentityDatabase from file. |
static IdentityDatabase |
fromStream(InputStream is)
Initialize an identity database from a stream. |
Identity |
getIdentity(PublicKey key)
Get an identity by key. |
Identity |
getIdentity(String name)
|
Enumeration |
identities()
|
void |
removeIdentity(Identity identity)
Removes an identity to the database. |
void |
save()
Saves the database to the default source file. |
void |
save(OutputStream os)
Save the database in its current state to an output stream. |
int |
size()
|
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(File file)
throws InvalidParameterException
file - the source file.
public IdentityDatabase(String name)
throws InvalidParameterException
| Method Detail |
public static IdentityDatabase fromStream(InputStream is)
throws IOException
is - the input stream from which to restore the database.
IOException - if a stream IO exception occurs
public static IdentityDatabase fromFile(File f)
throws IOException
f - the filename where the identity database is stored.
IOException - a file-related exception occurs (e.g.
the directory of the file passed does not exists, etc.public int size()
public Identity getIdentity(String name)
name - the name of the identity to be retrieved.
public Identity getIdentity(PublicKey key)
public void addIdentity(Identity identity)
throws KeyManagementException
identity - the identity to be added.
KeyManagementException - if a name or key clash
occurs, or if another exception occurs.
public void removeIdentity(Identity identity)
throws KeyManagementException
KeyManagementExceptionpublic Enumeration identities()
public void save(OutputStream os)
throws IOException
os - the output stream to which the database should be serialized.
IOException - if an IO exception is raised by stream
operations.
public void save()
throws IOException
IOException - when there is no default source
file specified for this database.public String toString()
toString in interface Principal
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||