[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)
commit96eab65d81db648d30c819dfa86e3af9c29e0566
tree1def4806c4f7e511b665d7ce5ebaec6a35521d4d
parent11e7da97a0f35fdd6f33283ea860f3036dcb39ab
[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

llvm-svn: 237400
llvm/lib/Fuzzer/CMakeLists.txt
llvm/lib/Fuzzer/FuzzerInternal.h
llvm/lib/Fuzzer/FuzzerSHA1.cpp [new file with mode: 0644]
llvm/lib/Fuzzer/FuzzerUtil.cpp
llvm/lib/Fuzzer/test/FuzzerUnittest.cpp