[riot-notifications] [RIOT] add the default wrapper for sha256 (#124)

René Kijewski notifications at github.com
Mon Aug 12 18:34:38 CEST 2013


> @@ -228,3 +228,19 @@ void SHA256_Final(unsigned char digest[32], SHA256_CTX *ctx)
>      /* Clear the context state */
>      memset((void *) ctx, 0, sizeof(*ctx));
>  }
> +
> +unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md)
> +{
> +    SHA256_CTX c;
> +    static unsigned char m[SHA256_DIGEST_LENGTH];
> +
> +    if (md == NULL) {
> +        md=m;
> +    }
> +
> +    SHA256_Init(&c);
> +    SHA256_Update(&c,d,n);

Spaces.

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/124/files#r5713952
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20130812/cdc0a664/attachment.html>


More information about the notifications mailing list