This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RFC: exporting sha256 sha512
- From: Shawn Landden <shawnlandden at gmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 24 Mar 2015 17:13:56 -0700
- Subject: RFC: exporting sha256 sha512
- Authentication-results: sourceware.org; auth=none
we already have this in crypt
proposed public header <sha2.h> below
even git does not use Intel processor extensions. This stuff in
non-trivial and there is lots of duplicated work being done. Makes
sense for glibc to be "high performance" as advertised and collect
this performance work.
would a patch for this be considered?
#pragma once
#include <stdint.h>
typedef struct {
char __internal_state[104];
} sha256_ctx;
void *sha256(const void *d, size_t n, void *md);
void sha256_init(sha256_ctx *s);
void sha256_push(sha256_ctx *s, const void *d, size_t n);
void sha256_finish(sha256_ctx *s, void *md);
typedef struct {
char __internal_state[200];
} sha512_ctx;
void *sha512(const void *d, size_t n, void *md);
void sha512_init(sha512_ctx *s);
void sha512_push(sha512_ctx *s, const void *d, size_t n);
void sha512_finish(sha512_ctx *s, void *md);
--
Liberty equality fraternity or death,
Shawn Landden
ChurchOfGit.com