On 11 July 2014 10:44, Jisha Mary Jose <jishamary1...@gmail.com> 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 Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help