mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-03-29 08:00:09 +00:00
remove sha512 wrapper and use openssl directly
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#include <openssl/sha.h>
|
||||
#include "sha512.h"
|
||||
|
||||
void crypto_hash_sha512 (unsigned char *out,
|
||||
const unsigned char *in,
|
||||
unsigned long long inlen)
|
||||
{
|
||||
SHA512(in, inlen, out);
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
void crypto_hash_sha512 (unsigned char *out,
|
||||
const unsigned char *in,
|
||||
unsigned long long inlen);
|
||||
@@ -6,7 +6,7 @@
|
||||
* - Christine van Vredendaal
|
||||
*/
|
||||
|
||||
#include "sha512.h"
|
||||
#include <openssl/sha.h>
|
||||
#include "sntrup761.h"
|
||||
#include "sxcrandom.h"
|
||||
|
||||
@@ -676,7 +676,7 @@ Hash_prefix (unsigned char *out, int b, const unsigned char *in, int inlen)
|
||||
x[0] = b;
|
||||
for (i = 0; i < inlen; ++i)
|
||||
x[i + 1] = in[i];
|
||||
crypto_hash_sha512 (h, x, inlen + 1);
|
||||
SHA512 (x, inlen + 1, h);
|
||||
for (i = 0; i < 32; ++i)
|
||||
out[i] = h[i];
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ category: Chat, Network, Web, System, Cryptography
|
||||
extra-source-files:
|
||||
- README.md
|
||||
- CHANGELOG.md
|
||||
- cbits/sha512.h
|
||||
# - cbits/sha512.h
|
||||
- cbits/sntrup761.h
|
||||
- cbits/sxcrandom.h
|
||||
|
||||
@@ -91,11 +91,11 @@ when:
|
||||
library:
|
||||
source-dirs: src
|
||||
c-sources:
|
||||
- cbits/sha512.c
|
||||
# - cbits/sha512.c
|
||||
- cbits/sntrup761.c
|
||||
- cbits/sxcrandom.c
|
||||
include-dirs: cbits
|
||||
extra-libraries: ssl crypto
|
||||
extra-libraries: crypto
|
||||
|
||||
executables:
|
||||
smp-server:
|
||||
|
||||
@@ -26,7 +26,6 @@ build-type: Simple
|
||||
extra-source-files:
|
||||
README.md
|
||||
CHANGELOG.md
|
||||
cbits/sha512.h
|
||||
cbits/sntrup761.h
|
||||
cbits/sxcrandom.h
|
||||
|
||||
@@ -156,11 +155,10 @@ library
|
||||
include-dirs:
|
||||
cbits
|
||||
c-sources:
|
||||
cbits/sha512.c
|
||||
cbits/sntrup761.c
|
||||
cbits/sxcrandom.c
|
||||
extra-libraries:
|
||||
ssl crypto
|
||||
crypto
|
||||
build-depends:
|
||||
aeson ==2.2.*
|
||||
, ansi-terminal >=0.10 && <0.12
|
||||
|
||||
Reference in New Issue
Block a user