mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 02:25:14 -07:00
728b26c2c1
Tagged as deprecated for years, never imported by `<sodium.h>`, and intentionally never documented. `edwards25519sha512batch` was just around for ABI compatibility with NaCl, but no projects seem to be using it.
20 lines
543 B
Bash
Executable File
20 lines
543 B
Bash
Executable File
#! /bin/sh
|
|
|
|
CT='ct.c'
|
|
|
|
echo '#include <assert.h>' > "$CT"
|
|
echo '#include <sodium.h>' >> "$CT"
|
|
echo 'int main(void) {' >> "$CT"
|
|
for macro in $(egrep -r '#define crypto_.*BYTES(_[A-Z]+)? ' src/libsodium/include | \
|
|
cut -d: -f2- | cut -d' ' -f2 | sort -u); do
|
|
func=$(echo "$macro" | tr A-Z a-z)
|
|
echo " assert($func() == $macro);" >> "$CT"
|
|
done
|
|
echo "return 0; }" >> "$CT"
|
|
|
|
CPPFLAGS="${CPPFLAGS} -Wno-deprecated-declarations"
|
|
${CC:-cc} "$CT" $CPPFLAGS $CFLAGS $LDFLAGS -lsodium || exit 1
|
|
./a.out || exit 1
|
|
rm -f a.out "$CT"
|
|
|