public void sign(PrivateKey key, String algorithm)
    throws CRLException, NoSuchAlgorithmException, InvalidKeyException,
        NoSuchProviderException, SignatureException {
        sign(key, algorithm, null);
    }
public void sign ( PrivateKey key , String algorithm ) throws CRLException , NoSuchAlgorithmException , InvalidKeyException , NoSuchProviderException , SignatureException { sign ( key , algorithm , null ) ; }
Encodes an X.509 CRL, and signs it using the given key.

@param key the private key used for signing.
@param algorithm the name of the signature algorithm used.

@exception NoSuchAlgorithmException on unsupported signature
algorithms.
@exception InvalidKeyException on incorrect key.
@exception NoSuchProviderException on incorrect provider.
@exception SignatureException on signature errors.
@exception CRLException if any mandatory data was omitted.