mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
8ee4646038
Will be used to generate build-ids in the jitdump code. Signed-off-by: Stephane Eranian <eranian@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Carl Love <cel@us.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: John McCutchan <johnmccutchan@google.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sonny Rao <sonnyrao@chromium.org> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Link: http://lkml.kernel.org/r/1448874143-7269-3-git-send-email-eranian@google.com [ tools/perf/Makefile.perf comment about NO_LIBCRYPTO and added it to tests/make ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
18 lines
325 B
C
18 lines
325 B
C
#include <openssl/sha.h>
|
|
#include <openssl/md5.h>
|
|
|
|
int main(void)
|
|
{
|
|
MD5_CTX context;
|
|
unsigned char md[MD5_DIGEST_LENGTH + SHA_DIGEST_LENGTH];
|
|
unsigned char dat[] = "12345";
|
|
|
|
MD5_Init(&context);
|
|
MD5_Update(&context, &dat[0], sizeof(dat));
|
|
MD5_Final(&md[0], &context);
|
|
|
|
SHA1(&dat[0], sizeof(dat), &md[0]);
|
|
|
|
return 0;
|
|
}
|