|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.security.auth.kerberos.KerberosKey
public class KerberosKey
This class represents a Kerberos key. See the Kerberos authentication RFC for more information: RFC 1510.
Constructor Summary | |
---|---|
KerberosKey(KerberosPrincipal principal,
byte[] key,
int type,
int version)
Construct a new key with the indicated principal and key. |
|
KerberosKey(KerberosPrincipal principal,
char[] passwd,
String algo)
Construct a new key with the indicated principal and a password. |
Method Summary | |
---|---|
void |
destroy()
Destroy this key. |
String |
getAlgorithm()
Return the name of the algorithm used to create this key. |
byte[] |
getEncoded()
Return the encoded form of this key. |
String |
getFormat()
Return the format of this key. |
int |
getKeyType()
Return the type of this key. |
KerberosPrincipal |
getPrincipal()
Return the principal associated with this key. |
int |
getVersionNumber()
Return the version number of this key. |
boolean |
isDestroyed()
Return true if this key has been destroyed. |
String |
toString()
Convert this Object to a human-readable String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KerberosKey(KerberosPrincipal principal, byte[] key, int type, int version)
principal
- the principalkey
- the key's datatype
- the key's typeversion
- the key's version numberpublic KerberosKey(KerberosPrincipal principal, char[] passwd, String algo) throws NotImplementedException
principal
- the principalpasswd
- the password to usealgo
- the algorithm; if null the "DES" algorithm is used
NotImplementedException
Method Detail |
---|
public final String getAlgorithm()
getAlgorithm
in interface Key
public final String getFormat()
getFormat
in interface Key
public final KerberosPrincipal getPrincipal()
public final int getKeyType()
public final int getVersionNumber()
public final byte[] getEncoded()
getEncoded
in interface Key
public void destroy() throws DestroyFailedException
destroy
in interface Destroyable
DestroyFailedException
- If this object could not be
destroyed.public boolean isDestroyed()
isDestroyed
in interface Destroyable
public String toString()
Object
System.out.println()
and such.
It is typical, but not required, to ensure that this method
never completes abruptly with a RuntimeException
.
This method will be called when performing string
concatenation with this object. If the result is
null
, string concatenation will instead
use "null"
.
The default implementation returns
getClass().getName() + "@" +
Integer.toHexString(hashCode())
.
toString
in class Object
Object.getClass()
,
Object.hashCode()
,
Class.getName()
,
Integer.toHexString(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |