public KeyImpl(KerberosPrincipal principal,char[] password,String algorithm){
  try {
    PrincipalName princ=new PrincipalName(principal.getName());
    EncryptionKey key=new EncryptionKey(password,princ.getSalt(),algorithm);
    this.keyBytes=key.getBytes();
    this.keyType=key.getEType();
  }
 catch (  KrbException e) {
    throw new IllegalArgumentException(e.getMessage());
  }
}

public KeyImpl ( KerberosPrincipal principal , char [ ] password , String algorithm ) { try { PrincipalName princ = new PrincipalName ( principal . getName ( ) ) ; EncryptionKey key = new EncryptionKey ( password , princ . getSalt ( ) , algorithm ) ; this . keyBytes = key . getBytes ( ) ; this . keyType = key . getEType ( ) ; } catch ( KrbException e ) { throw new IllegalArgumentException ( e . getMessage ( ) ) ; } }
constructs a keyimpl from a password .
