HI,

SHA1HashSize, context etc are defined in sha1.h which I include as a header
file in the program.

Regards,

Jisha Mary Jose
......jMj......


On 11 July 2014 06:38, Johny Mattsson <[email protected]> wrote:

> On 11 July 2014 10:44, Jisha Mary Jose <[email protected]> wrote:
>
>> void hash(){
>>
>> uint8_t x=123;
>>
>> call SHA1.context(context);
>>
>
> I don''t see where 'context' comes from. I'll have to assume it's defined
> somewhere.
>
>
>
>> call SHA1.update(context, x, sizeof(x));
>>
>
> That should almost certainly be &x rather than x. It looks like you're
> treating the value 123 as a pointer, which would explain why you're getting
> different values all the time...
>
>
>
>> call SHA1.digest(context, Message_Digest[SHA1HashSize]);
>>
>
> Again, I don't know where Message_Digest comes from.
>
>
>
> Cheers,
> /Johny
> --
> Johny Mattsson
> Senior Software Engineer
>
> DiUS Computing Pty. Ltd.
>
> *where ideas are engineered *
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to