def key_encrypt(key, decrypted_key)
      encrypted_key, new_alg = alg.key_encrypt(key, enc, decrypted_key)
      new_jwe = JOSE::JWE.from_map(to_map)
      new_jwe.alg = new_alg
      return encrypted_key, new_jwe
    end
def key_encrypt(key, decrypted_key)
      encrypted_key, new_alg = alg.key_encrypt(key, enc, decrypted_key)
      new_jwe = JOSE::JWE.from_map(to_map)
      new_jwe.alg = new_alg
      return encrypted_key, new_jwe
    end
Encrypts the `decrypted_key` using the `key` and the `"alg"` and `"enc"` specified by the `jwe`.

 @param [JOSE::JWK, [JOSE::JWK]] key
 @param [String] decrypted_key
 @return [[String, JOSE::JWE]]