com.ibm.security.krb5.internal.ktab
Class StreamKeyTab
- java.lang.Object
com.ibm.security.krb5.internal.ktab.StreamKeyTab
- public class StreamKeyTab
- extends java.lang.Object
Version:
1.1, 5/7/07
Author:
Thomas Owusu
Constructor Summary
Constructor and Description |
---|
StreamKeyTab(java.io.InputStream inputKeytab)
|
StreamKeyTab(java.io.InputStream inputKeytab,java.io.OutputStream outputKeytab)
|
StreamKeyTab(java.io.OutputStream outputKeytab)
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
addEntry(PrincipalName service,java.lang.String psswd)
Adds a new entry in the key table.
|
|
deleteEntry(PrincipalName service)
Removes an entry from the key table.
|
|
findServiceEntry(PrincipalName service)
Searches for the service entry in the keytab file.
|
getAllKeys(PrincipalName service)
|
|
getEntries()
Gets the list of service entries in key table.
|
|
getEntry(PrincipalName service)
Reads the service entry from the key table.
|
|
getKey(PrincipalName service,int enctype)
|
|
readServiceKey(PrincipalName service)
Reads the service key from the keytab file.
|
|
|
save()
Saves the file at the directory.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
StreamKeyTab
- public StreamKeyTab(java.io.InputStream inputKeytab)
- throws java.io.IOException
- KrbException
StreamKeyTab
- public StreamKeyTab(java.io.InputStream inputKeytab,
- java.io.OutputStream outputKeytab)
- throws java.io.IOException
- KrbException
StreamKeyTab
- public StreamKeyTab(java.io.OutputStream outputKeytab)
- throws java.io.IOException
- KrbException
Method Detail
getEntry
- public KeyTabEntry getEntry(PrincipalName service)
Reads the service entry from the key table.
Parameters:
service
- the PrincipalName of the requested service. A null
service name will return the latest entry in the key table. Returns:
service key.
getKey
- public EncryptionKey getKey(PrincipalName service,
- int enctype)
getAllKeys
- public EncryptionKey[] getAllKeys( PrincipalName service)
readServiceKey
- public EncryptionKey readServiceKey( PrincipalName service)
Reads the service key from the keytab file.
Parameters:
service
- the PrincipalName of the requested service. A null
service name will return the latest entry in the keytab. Returns:
service key.
findServiceEntry
- public boolean findServiceEntry( PrincipalName service)
Searches for the service entry in the keytab file.
Parameters:
service
- the PrincipalName of the requested service. Returns:
true if the entry is found, otherwise, return false.
addEntry
- public void addEntry(PrincipalName service,
- java.lang.String psswd)
- throws KrbCryptoException
Adds a new entry in the key table.
Parameters:
service
- the service which will have a new entry in the key table. psswd
- the password which generates the key. Throws:
getEntries
- public KeyTabEntry[] getEntries( )
Gets the list of service entries in key table.
Returns:
array of
KeyTabEntry
. save
- public void save()
- throws java.io.IOException
Saves the file at the directory.
Throws:
java.io.IOException
deleteEntry
- public void deleteEntry(PrincipalName service)
Removes an entry from the key table.
Parameters:
service
- the service PrincipalName
.