public final Key unwrap (byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException

Unwrap a previously wrapped key.

Parameters:
wrappedKey    the key to be unwrapped.
wrappedKeyAlgorithm    the algorithm associated with the wrapped key.
wrappedKeyType    the type of the wrapped key. This must be one of SECRET_KEY, PRIVATE_KEY, or PUBLIC_KEY.

Returns:  the unwrapped key.

Exceptions:
IllegalStateException    if this cipher is in a wrong state (e.g., has not been initialized).
NoSuchAlgorithmException    if no installed providers can create keys of type wrappedKeyType for the wrappedKeyAlgorithm.
InvalidKeyException    if wrappedKey does not represent a wrapped key of type wrappedKeyType for the wrappedKeyAlgorithm.