Skip to content

Commit

Permalink
compact
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Jan 30, 2024
1 parent 6986088 commit 4bb5d44
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/secret.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,8 @@ static void clear_buffer(void *buf, size_t sz) {
static void hash_bytes(R_outpstream_t stream, void *src, int len) {

secretbase_context *sctx = (secretbase_context *) stream->data;
if (sctx->skip) {
sctx->skip--;
} else {
mbedtls_sha3_update(sctx->ctx, (const uint8_t *) src, (size_t) len);
}

sctx->skip ? (void) sctx->skip-- : mbedtls_sha3_update(sctx->ctx, (const uint8_t *) src, (size_t) len);

}

static void hash_file(mbedtls_sha3_context *ctx, const SEXP x) {
Expand Down

0 comments on commit 4bb5d44

Please sign in to comment.