APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.krb5.internal.rcache

public Class AuthTimeWithHash

extends AuthTime
implements Comparable<AuthTimeWithHash>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.util.Objects

The class represents a new style replay cache entry. It can be either used inside memory or in a dfl file.

Field Summary

Modifier and TypeField and Description
public static final String
pack-priv final String
pack-priv final String
Inherited from sun.security.krb5.internal.rcache.AuthTime:
clientctimecusecserver

Constructor Summary

AccessConstructor and Description
public
AuthTimeWithHash(String client, String server, int ctime, int cusec, String hashAlg, String hash)

Constructs a new AuthTimeWithHash.

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(AuthTimeWithHash other)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public byte[]
encode(boolean
write new style if true
withHash
)

Overrides sun.security.krb5.internal.rcache.AuthTime.encode.

Encodes to be used in a dfl file

public boolean

Returns:

true if two objects are equivalent, otherwise, return false.
equals
(Object
an object.
o
)

Overrides java.lang.Object.equals.

Compares if an object equals to an AuthTimeWithHash object.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code for this AuthTimeWithHash object.

public boolean

Returns:

true if all AuthTime fields are the same
isSameIgnoresHash
(AuthTime old)

Compares with a possibly old style object.

public static String
public boolean

Returns:

true if all AuthTime fields are the same but different hash
sameTimeDiffHash
(AuthTimeWithHash old)

Compares with a possibly old style object.

public String
toString()

Overrides sun.security.krb5.internal.rcache.AuthTime.toString.

Returns a string representation of the object.

Inherited from sun.security.krb5.internal.rcache.AuthTime:
encode0readFrom

Field Detail

DEFAULT_HASH_ALGback to summary
public static final String DEFAULT_HASH_ALG
hashback to summary
pack-priv final String hash
hashAlgback to summary
pack-priv final String hashAlg

Constructor Detail

AuthTimeWithHashback to summary
public AuthTimeWithHash(String client, String server, int ctime, int cusec, String hashAlg, String hash)

Constructs a new AuthTimeWithHash.

Method Detail

compareToback to summary
public int compareTo(AuthTimeWithHash other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Annotations
@Override
encodeback to summary
public byte[] encode(boolean withHash)

Overrides sun.security.krb5.internal.rcache.AuthTime.encode.

Encodes to be used in a dfl file

Parameters
withHash:boolean

write new style if true

Annotations
@Override
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Compares if an object equals to an AuthTimeWithHash object.

Parameters
o:Object

an object.

Returns:boolean

true if two objects are equivalent, otherwise, return false.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code for this AuthTimeWithHash object.

Annotations
@Override
isSameIgnoresHashback to summary
public boolean isSameIgnoresHash(AuthTime old)

Compares with a possibly old style object. Used in DflCache$Storage#loadAndCheck.

Returns:boolean

true if all AuthTime fields are the same

realAlgback to summary
public static String realAlg(String alg)
sameTimeDiffHashback to summary
public boolean sameTimeDiffHash(AuthTimeWithHash old)

Compares with a possibly old style object. Used in DflCache$Storage#loadAndCheck.

Returns:boolean

true if all AuthTime fields are the same but different hash

toStringback to summary
public String toString()

Overrides sun.security.krb5.internal.rcache.AuthTime.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override