public static EncryptionKey[] acquireSecretKeys(PrincipalName princ,String keytab){
  if (princ == null)   throw new IllegalArgumentException("Cannot have null pricipal name to look in keytab.");
  KeyTab ktab=KeyTab.getInstance(keytab);
  return ktab.readServiceKeys(princ);
}

public static EncryptionKey [ ] acquireSecretKeys ( PrincipalName princ , String keytab ) { if ( princ == null ) throw new IllegalArgumentException ( "Cannot have null pricipal name to look in keytab." ) ; KeyTab ktab = KeyTab . getInstance ( keytab ) ; return ktab . readServiceKeys ( princ ) ; }
obtains all versions of the secret key of the principal from a keytab .
