public final Key unwrap(
        byte[]      wrappedKey,
        String      wrappedKeyAlgorithm,
        int         wrappedKeyType)
    throws IllegalStateException, InvalidKeyException, NoSuchAlgorithmException
    {
		if ( mode != UNWRAP_MODE )
			throw new IllegalStateException("Cipher is not initialised for unwrapping");

		if ( wrappedKeyType != SECRET_KEY && wrappedKeyType != PUBLIC_KEY
			&& wrappedKeyType != PRIVATE_KEY )
		{
			throw new IllegalArgumentException("Invalid key type argument");
		}

        if (wrappedKey == null)
        {
			throw new IllegalArgumentException("Null wrappedKey passed");
        }

        if (wrappedKeyAlgorithm == null)
        {
			throw new IllegalArgumentException("Null wrappedKeyAlgorithm string passed");
        }

        return cipherSpi.engineUnwrap(wrappedKey, wrappedKeyAlgorithm, wrappedKeyType);
    }