Skip to content

Commit

Permalink
chore(core/sha1): removed SHA1 helper function
Browse files Browse the repository at this point in the history
This function is obsolete and the name causes problems when linking with OpenSSL statically.
  • Loading branch information
Suwup committed Jan 21, 2024
1 parent 35a9631 commit 55c2bdd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
15 changes: 0 additions & 15 deletions core/sha1.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,18 +278,3 @@ void SHA1Final(
memset(context, '\0', sizeof(*context));
memset(&finalcount, '\0', sizeof(finalcount));
}

void SHA1(
char *hash_out,
const char *str,
int len)
{
SHA1_CTX ctx;
unsigned int ii;

SHA1Init(&ctx);
for (ii=0; ii<len; ii+=1)
SHA1Update(&ctx, (const unsigned char*)str + ii, 1);
SHA1Final((unsigned char *)hash_out, &ctx);
}

5 changes: 0 additions & 5 deletions core/sha1.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,4 @@ void SHA1Final(
SHA1_CTX * context
);

void SHA1(
char *hash_out,
const char *str,
int len);

#endif /* SHA1_H */

0 comments on commit 55c2bdd

Please sign in to comment.