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

public Class PAForUserEnc

extends Object
Class Inheritance
Imports
java.io.ByteArrayOutputStream, .IOException, sun.security.krb5.*, sun.security.krb5.internal.crypto.KeyUsage, sun.security.krb5.internal.util.KerberosString, sun.security.util.DerOutputStream, .DerValue

Implements the ASN.1 PA-FOR-USER type.
padata-type  ::= PA-FOR-USER
                 -- value 129
padata-value ::= EncryptedData
                 -- PA-FOR-USER-ENC
PA-FOR-USER-ENC ::= SEQUENCE {
    userName[0] PrincipalName,
    userRealm[1] Realm,
    cksum[2] Checksum,
    auth-package[3] KerberosString
}

This definition reflects MS-SFU.

Field Summary

Modifier and TypeField and Description
public static final String
private final EncryptionKey
public final PrincipalName

Constructor Summary

AccessConstructor and Description
public
public
PAForUserEnc(DerValue
the input object
encoding
,
EncryptionKey
the key to verify the checksum inside encoding
key
)

Constructs a PA-FOR-USER object from a DER encoding.

Method Summary

Modifier and TypeMethod and Description
public byte[]
public PrincipalName
public byte[]
getS4UByteArray()

Returns S4UByteArray, the block to calculate checksum inside a PA-FOR-USER-ENC data structure.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

AUTH_PACKAGEback to summary
public static final String AUTH_PACKAGE
keyback to summary
private final EncryptionKey key
nameback to summary
public final PrincipalName name

Constructor Detail

PAForUserEncback to summary
public PAForUserEnc(PrincipalName name, EncryptionKey key)
PAForUserEncback to summary
public PAForUserEnc(DerValue encoding, EncryptionKey key) throws Asn1Exception, KrbException, IOException

Constructs a PA-FOR-USER object from a DER encoding.

Parameters
encoding:DerValue

the input object

key:EncryptionKey

the key to verify the checksum inside encoding

Exceptions
KrbException:
if the verification fails. Note: this method is now only used by test KDC, therefore the verification is ignored (at the moment).

Method Detail

asn1Encodeback to summary
public byte[] asn1Encode() throws Asn1Exception, IOException
getNameback to summary
public PrincipalName getName()
getS4UByteArrayback to summary
public byte[] getS4UByteArray()

Returns S4UByteArray, the block to calculate checksum inside a PA-FOR-USER-ENC data structure. It includes: 1. userName.name-type encoded as a 4-byte integer in little endian byte order 2. all string values in the sequence of strings contained in the userName.name-string field 3. the string value of the userRealm field 4. the string value of auth-package field

toStringback to summary
public String toString()

Overrides java.lang.Object.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.