code: public final Key unwrap(byte[] wrappedKey,
                              String wrappedKeyAlgorithm,
                              int wrappedKeyType)
              throws InvalidKeyException, NoSuchAlgorithmException {
  
          if (!(this instanceof NullCipher)) {
              if (!initialized) {
                  throw new IllegalStateException("Cipher not initialized");
              }
              if (opmode != Cipher.UNWRAP_MODE) {
                  throw new IllegalStateException("Cipher not initialized " +
                                                  "for unwrapping keys");
              }
          }
          if ((wrappedKeyType != SECRET_KEY) &&
              (wrappedKeyType != PRIVATE_KEY) &&
              (wrappedKeyType != PUBLIC_KEY)) {
              throw new InvalidParameterException("Invalid key type");
          }
  
          updateProviderIfNeeded();
          return spi.engineUnwrap(wrappedKey,
                                        wrappedKeyAlgorithm,
                                        wrappedKeyType);
      }
docs: Unwrap a previously wrapped key.
  
  @param wrappedKey the key to be unwrapped.
  
  @param wrappedKeyAlgorithm the algorithm associated with the wrapped
  key.
  
  @param wrappedKeyType the type of the wrapped key. This must be one of
  <code>SECRET_KEY</code>, <code>PRIVATE_KEY</code>, or
  <code>PUBLIC_KEY</code>.
  
  @return the unwrapped key.
  
  @exception IllegalStateException if this cipher is in a wrong state
  (e.g., has not been initialized).
  
  @exception NoSuchAlgorithmException if no installed providers
  can create keys of type <code>wrappedKeyType</code> for the
  <code>wrappedKeyAlgorithm</code>.
  
  @exception InvalidKeyException if <code>wrappedKey</code> does not
  represent a wrapped key of type <code>wrappedKeyType</code> for
  the <code>wrappedKeyAlgorithm</code>.