public final class KerberosCredMessage extends Object implements Destroyable
A KRB_CRED message is defined in Section 5.8.1 of the Kerberos Protocol Specification (RFC 4120) as:
KRB-CRED ::= [APPLICATION 22] SEQUENCE {
pvno [0] INTEGER (5),
msg-type [1] INTEGER (22),
tickets [2] SEQUENCE OF Ticket,
enc-part [3] EncryptedData -- EncKrbCredPart
}
| Constructor and Description |
|---|
KerberosCredMessage(KerberosPrincipal sender,
KerberosPrincipal recipient,
byte[] message)
Constructs a
KerberosCredMessage object. |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys this object by clearing out the message.
|
boolean |
equals(Object other)
Compares the specified object with this
KerberosCredMessage
for equality. |
byte[] |
getEncoded()
Returns the DER encoded form of the KRB_CRED message.
|
KerberosPrincipal |
getRecipient()
Returns the recipient of this message.
|
KerberosPrincipal |
getSender()
Returns the sender of this message.
|
int |
hashCode()
Returns a hash code for this
KerberosCredMessage. |
boolean |
isDestroyed()
Determine if this
Object has been destroyed. |
String |
toString()
Returns an informative textual representation of this
KerberosCredMessage. |
public KerberosCredMessage(KerberosPrincipal sender, KerberosPrincipal recipient, byte[] message)
KerberosCredMessage object.
The contents of the message argument are copied; subsequent
modification of the byte array does not affect the newly created object.
sender - the sender of the messagerecipient - the recipient of the messagemessage - the DER encoded KRB_CRED messageNullPointerException - if any of sender, recipient
or message is nullpublic byte[] getEncoded()
IllegalStateException - if the object is destroyedpublic KerberosPrincipal getSender()
IllegalStateException - if the object is destroyedpublic KerberosPrincipal getRecipient()
IllegalStateException - if the object is destroyedpublic void destroy()
destroy in interface Destroyablepublic boolean isDestroyed()
DestroyableObject has been destroyed.isDestroyed in interface DestroyableObject has been destroyed,
false otherwise.public String toString()
KerberosCredMessage.public int hashCode()
KerberosCredMessage.hashCode in class ObjectKerberosCredMessage.Object.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public boolean equals(Object other)
KerberosCredMessage
for equality. Returns true if the given object is also a
KerberosCredMessage and the two KerberosCredMessage
instances are equivalent. More formally two KerberosCredMessage
instances are equal if they have equal sender, recipient, and encoded
KRB_CRED messages.
A destroyed KerberosCredMessage object is only equal to itself.equals in class Objectother - the object to compare toKerberosCredMessage, false otherwise.Object.hashCode(),
HashMap Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait