From a50bb1be22d0a00cf4c1dad006f8cda253b23228 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 23 Aug 2015 02:21:23 -0700 Subject: Use OpenSSL to implement SHA1 instead of our copy. --- ldid.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'ldid.cpp') diff --git a/ldid.cpp b/ldid.cpp index e1fbda9..c2227a5 100644 --- a/ldid.cpp +++ b/ldid.cpp @@ -23,14 +23,12 @@ #include "minimal/string.h" #include "minimal/mapping.h" -extern "C" { -#include "sha1.h" -} - #include #include #include +#include + #include struct fat_header { @@ -719,10 +717,7 @@ struct CodeDirectory { extern "C" uint32_t hash(uint8_t *k, uint32_t length, uint32_t initval); void sha1(uint8_t *hash, uint8_t *data, size_t size) { - SHA1Context context; - SHA1Reset(&context); - SHA1Input(&context, data, size); - SHA1Result(&context, hash); + SHA1(data, size, hash); } struct CodesignAllocation { -- cgit v1.2.3