public String toString() { StringBuffer str = new StringBuffer(); for (int i = 0; i < nameStrings.length; i++) { if (i > 0) str.append("/"); str.append(nameStrings[i]); } str.append("@"); str.append(nameRealm.toString()); return str.toString(); }
public String getSalt() { if (salt == null) { StringBuffer salt = new StringBuffer(); salt.append(nameRealm.toString()); for (int i = 0; i < nameStrings.length; i++) { salt.append(nameStrings[i]); } return salt.toString(); } return salt; }
/** * Writes data field values of <code>PrincipalName</code> in FCC format to an output stream. * * @param cos a <code>CCacheOutputStream</code> for writing data. * @exception IOException if an I/O exception occurs. * @see sun.security.krb5.internal.ccache.CCacheOutputStream */ public void writePrincipal(CCacheOutputStream cos) throws IOException { cos.write32(nameType); cos.write32(nameStrings.length); byte[] realmBytes = null; realmBytes = nameRealm.toString().getBytes(); cos.write32(realmBytes.length); cos.write(realmBytes, 0, realmBytes.length); byte[] bytes = null; for (int i = 0; i < nameStrings.length; i++) { bytes = nameStrings[i].getBytes(); cos.write32(bytes.length); cos.write(bytes, 0, bytes.length); } }
public String getRealmString() { return nameRealm.toString(); }