public ISO9796d2Signer(AsymmetricBlockCipher cipher,Digest digest,boolean implicit){
  this.cipher=cipher;
  this.digest=digest;
  if (implicit) {
    trailer=TRAILER_IMPLICIT;
  }
 else {
    Integer trailerObj=(Integer)trailerMap.get(digest.getAlgorithmName());
    if (trailerObj != null) {
      trailer=trailerObj.intValue();
    }
 else {
      throw new IllegalArgumentException("no valid trailer for digest");
    }
  }
}

public ISO9796d2Signer ( AsymmetricBlockCipher cipher , Digest digest , boolean implicit ) { this . cipher = cipher ; this . digest = digest ; if ( implicit ) { trailer = TRAILER_IMPLICIT ; } else { Integer trailerObj = ( Integer ) trailerMap . get ( digest . getAlgorithmName ( ) ) ; if ( trailerObj != null ) { trailer = trailerObj . intValue ( ) ; } else { throw new IllegalArgumentException ( "no valid trailer for digest" ) ; } } }
generate a signer for the with either implicit or explicit trailers for iso9796 - 2 .
