RSAPrivateCrtKeyImpl(BigInteger n,BigInteger e,BigInteger d,BigInteger p,BigInteger q,BigInteger pe,BigInteger qe,BigInteger coeff) throws InvalidKeyException {
  this.n=n;
  this.e=e;
  this.d=d;
  this.p=p;
  this.q=q;
  this.pe=pe;
  this.qe=qe;
  this.coeff=coeff;
  RSAKeyFactory.checkRSAProviderKeyLengths(n.bitLength(),e);
  algid=rsaId;
  try {
    DerOutputStream out=new DerOutputStream();
    out.putInteger(0);
    out.putInteger(n);
    out.putInteger(e);
    out.putInteger(d);
    out.putInteger(p);
    out.putInteger(q);
    out.putInteger(pe);
    out.putInteger(qe);
    out.putInteger(coeff);
    DerValue val=new DerValue(DerValue.tag_Sequence,out.toByteArray());
    key=val.toByteArray();
  }
 catch (  IOException exc) {
    throw new InvalidKeyException(exc);
  }
}

RSAPrivateCrtKeyImpl ( BigInteger n , BigInteger e , BigInteger d , BigInteger p , BigInteger q , BigInteger pe , BigInteger qe , BigInteger coeff ) throws InvalidKeyException { this . n = n ; this . e = e ; this . d = d ; this . p = p ; this . q = q ; this . pe = pe ; this . qe = qe ; this . coeff = coeff ; RSAKeyFactory . checkRSAProviderKeyLengths ( n . bitLength ( ) , e ) ; algid = rsaId ; try { DerOutputStream out = new DerOutputStream ( ) ; out . putInteger ( 0 ) ; out . putInteger ( n ) ; out . putInteger ( e ) ; out . putInteger ( d ) ; out . putInteger ( p ) ; out . putInteger ( q ) ; out . putInteger ( pe ) ; out . putInteger ( qe ) ; out . putInteger ( coeff ) ; DerValue val = new DerValue ( DerValue . tag_Sequence , out . toByteArray ( ) ) ; key = val . toByteArray ( ) ; } catch ( IOException exc ) { throw new InvalidKeyException ( exc ) ; } }
construct a key from its components . used by the rsakeyfactory and the rsakeypairgenerator .
