[riot-notifications] [RIOT] add sha256 implementation (#96)

Oleg Hahm notifications at github.com
Fri Aug 9 00:18:54 CEST 2013


For some reason the hash on a MSB-A2 (ARM) is different to the results in native port or python.
Tested with an empty string and "1234567890_1".

Python:
```
In [1]: import hashlib

In [2]: hashlib.sha256("").hexdigest()
Out[2]: 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'

In [3]: hashlib.sha256("1234567890_1").hexdigest()
Out[3]: '3eda9ffe5537a588f54d0b2a453e5fa932986d0bc0f9556924f5c2379b2c91b0'
```
Native Port:
```
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
3eda9ffe5537a588f54d0b2a453e5fa932986d0bc0f9556924f5c2379b2c91b0
```

MSB-A2:
```
2013-08-09 00:09:10,934 - INFO # 08c5a54e766e56a6f8430524d46fb0fee37b775701c44995daaf36640e33d265
2013-08-09 00:09:10,940 - INFO # f380fae90c3190622af57cd9e2c6ea485a5137679d6f41ccb9978cfee31b4bd5
```

See also Wikipedia: http://de.wikipedia.org/wiki/SHA-2#Beispiel-Hashes

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/96#issuecomment-22362517
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130808/8a0760ad/attachment.html>


More information about the notifications mailing list