Jump to content
Sign in to follow this  

Hex strings

Recommended Posts


I'm working on a wrapper for aria2.

It's a commandline download tool essentially.

When a download starts, it is assigned an id (gid)

But for some reason I cannot fathom, the std output is The first 6 characters of the GID as a hex string

Somehow, it gets from this string gid "4a8667f0eb00f3ae" to this hex string "0ea33e"

And I have no idea how.

Any ideas?


string Gid = addDownload();
byte[] ba = Encoding.UTF8.GetBytes(Gid.Substring(0, 6));
var hexString = BitConverter.ToString(ba);
hexString = hexString.Replace("-", "");

Which gives me "373636386134"

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this