How big are your hex strings? If it is really a string, and could be more
than 16 bytes (i.e. what you can fit in a `UInt128`), then I think you'd
want to use `Base.hex2bytes`.
In general, if you are looking for something in Julia, you can just to `?`
at the REPL prompt, and then type what you are looking for... I just found
`hex2bytes` by `?hex`...
Scott
On Tuesday, May 19, 2015 at 2:08:34 PM UTC-4, Martin Becze wrote:
>
> Thanks Scott!
> So s = parse("0xABCDE") gives me an uint32. and base64encode doesn't have
> a match for that. I think it want a string. So how do i go from uint32 ->
> literal string?
>
> On Tuesday, May 19, 2015 at 12:44:42 PM UTC-4, Scott Jones wrote:
>>
>> You need to be running one of the nightly builds of 0.4 (or use a
>> package, I think it is Codecs.jl).
>>
>> On Tuesday, May 19, 2015 at 12:41:18 PM UTC-4, Martin Becze wrote:
>>>
>>> Do i need to import something? I get this.
>>>
>>> base64encode not defined
>>> while loading In[1], in expression starting on line 2
>>>
>>>
>>>
>>> On Tuesday, May 19, 2015 at 2:41:49 AM UTC-4, Darwin Darakananda wrote:
>>>>
>>>> This probably is not the safest way to do this, but would something
>>>> like this work for you?
>>>>
>>>> s = "0xABCDE"
>>>> base64encode(parse(s))
>>>>
>>>>
>>>> On Monday, May 18, 2015 at 9:54:17 PM UTC-7, Martin Becze wrote:
>>>>>
>>>>> Hello I'm just starting with julia and im stuck on converting a hex
>>>>> string to base64 encoded string. How would you do this with julia?
>>>>>
>>>>> Thanks,
>>>>> -Martin
>>>>>
>>>>