2 * Base-64 tvbuff implementation (based on real tvb)
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
15 #include <epan/tvbuff.h>
16 #include <wsutil/base64.h>
19 base64_to_tvb(tvbuff_t *parent, const char *base64)
22 char *data = g_strdup(base64);
25 len = (gint) ws_base64_decode_inplace(data);
26 tvb = tvb_new_child_real_data(parent, (const guint8 *)data, len, len);
28 tvb_set_free_cb(tvb, g_free);
34 * Editor modelines - http://www.wireshark.org/tools/modelines.html
39 * indent-tabs-mode: nil
42 * ex: set shiftwidth=2 tabstop=8 expandtab:
43 * :indentSize=2:tabSize=8:noTabs=true: