Function for Decimal to Hex

Is there a function within Bro that will allow me to turn decimal into hex?

You could do something like this ("d" is a count or int value):

print fmt("%x", d);

Or, if your decimal is already a string, there’s always this:

https://www.bro.org/sphinx/scripts/base/bif/bro.bif.bro.html#id-bytestring_to_hexstr

-Dop

Sorry, what I want to do is take an integer like:
32154
and convert it to hexidecimal:
7D9A

Then what Daniel said is your way forward, if you need capital letters, something like this would work:

local num: count = 32154;
print fmt("%s",to_upper(fmt("%x",num)));

-Dop

The to_upper() function returns a string, so your example can be simplified:

   print to_upper(fmt("%x",num));

Awesome, works! Thank you guys!