Name

KerberosKey

Synopsis

This class is a javax.crypto.SecretKey implementation that represents the secret key of a Kerberos principal. A Kerberos-based javax.security.auth.spi.LoginModule implementation instantiates a KerberosKey object and stores it in the private credential set of the authenticated Subject it creates.

javax.security.auth.kerberos.KerberosKey

Figure 19-15. javax.security.auth.kerberos.KerberosKey

public class KerberosKey implements javax.security.auth.Destroyable, 
        javax.crypto.SecretKey {
// Public Constructors
     public KerberosKey(KerberosPrincipal principal, char[ ] password, 
        String algorithm);  
     public KerberosKey(KerberosPrincipal principal, byte[ ] keyBytes, int keyType, 
        int versionNum);  
// Public Instance Methods
     public final int getKeyType( );  
     public final KerberosPrincipal getPrincipal( );  
     public final int getVersionNumber( );  
// Methods Implementing Destroyable
     public void destroy( ) throws javax.security.auth.DestroyFailedException;  
     public boolean isDestroyed( );  
// Methods Implementing Key
     public final String getAlgorithm( );  
     public final byte[ ] getEncoded( );  
     public final String getFormat( );  
// Public Methods Overriding Object
     public String toString( );  
}

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.