Hmm, what version of Nettle do you have installed? Pkg.status() should tell
you.
-E


On Mon, Jun 30, 2014 at 7:19 AM, jwmillerusa <[email protected]> wrote:

> Hi, I get the following error when running the hashing functionality
> example for Nettle:
>
> julia> using Nettle
>> julia> h = HashState(SHA256)
>> SHA256 Hash state
>> julia> update!(h, "this is a test")
>> ERROR: no method pointer(ASCIIString,)
>>  in update! at C:\Users\jeff\.julia\Nettle\src\hash.jl:74
>> WARNING: backtraces on your platform are often misleading or partially
>> incorrect
>
>
> The issue seems to be with the update! function:
>
>     @eval function update!(state::HashState{$name},data)
>>
>> ccall($fptr_update,Void,(Ptr{Void},Csize_t,Ptr{Uint8}),state.ctx,sizeof(data),pointer(data))
>>     end
>
>
> If I replace pointer(data) by just data, it seems to work (but I'm not
> sure if this is a good idea or not!):
>
> julia> using Nettle
>> julia> h = HashState(SHA256)
>> SHA256 Hash state
>> julia> update!(h, "this is a test")
>> julia> hexdigest!(h)
>> "2e99758548972a8e8822ad47fa1017ff72f06f3ff6a016851f45c398732bc50c"
>
>
> Is this a bug or am I doing something wrong?
>
> I'm using Julia version 0.2.1 on 64-bit Windows 7. Thanks.
>
> Jeff
>

Reply via email to