[lib/Fuzzer] Add SHA1 implementation from public domain.
authorKostya Serebryany <kcc@google.com>
Thu, 14 May 2015 22:41:49 +0000 (22:41 +0000)
committerKostya Serebryany <kcc@google.com>
Thu, 14 May 2015 22:41:49 +0000 (22:41 +0000)
commit6f1b9541baf5e66055a0a526201c363bc2b5ff1f
tree6863d5e48d7def854cf36de8ee69453715a49775
parent33a0cf6c56c34e32b70a1a4930d90bff883e9bb3
[lib/Fuzzer] Add SHA1 implementation from public domain.

Summary:
This adds a SHA1 implementation taken from public domain code.
The change is trivial, but as it involves third-party code I'd like
a second pair of eyes before commit.

LibFuzzer can not use SHA1 from openssl because openssl may not be available
and because we may be fuzzing openssl itself.
Using sha1sum via a pipe is too slow.

Test Plan: n/a

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: majnemer, llvm-commits

Differential Revision: http://reviews.llvm.org/D9733

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237400 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Fuzzer/CMakeLists.txt
lib/Fuzzer/FuzzerInternal.h
lib/Fuzzer/FuzzerSHA1.cpp [new file with mode: 0644]
lib/Fuzzer/FuzzerUtil.cpp
lib/Fuzzer/test/FuzzerUnittest.cpp