From 6f7b5acd205b3b5f6315ccc8ffe363d6acd3ad94 Mon Sep 17 00:00:00 2001 From: Paul Driver Date: Fri, 21 Aug 2020 10:55:32 -0700 Subject: [PATCH] use urcrypt instead of openssl for bash calculation --- pkg/urbit/noun/jets.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/pkg/urbit/noun/jets.c b/pkg/urbit/noun/jets.c index 8a8682f614..e490aaac40 100644 --- a/pkg/urbit/noun/jets.c +++ b/pkg/urbit/noun/jets.c @@ -2,12 +2,7 @@ ** */ #include "all.h" - -#if defined(U3_OS_osx) -#include -#else -#include -#endif +#include /** Data structures. **/ @@ -133,19 +128,7 @@ _cj_bash(u3_noun bat) } // assume little-endian fat_y = (c3_y*) wor_w; -#if defined(U3_OS_osx) - CC_SHA256_CTX ctx_h; - - CC_SHA256_Init(&ctx_h); - CC_SHA256_Update(&ctx_h, fat_y, met_w); - CC_SHA256_Final(dig_y, &ctx_h); -#else - SHA256_CTX ctx_h; - - SHA256_Init(&ctx_h); - SHA256_Update(&ctx_h, fat_y, met_w); - SHA256_Final(dig_y, &ctx_h); -#endif + urcrypt_sha256(fat_y, met_w, dig_y); pro = u3i_bytes(32, dig_y); u3h_put(u3R->jed.bas_p, bat, u3k(pro)); u3a_wfree(wor_w);