Packages
Signal Protocol cryptographic primitives NIF implementation
Current section
Files
Jump to
Current section
Files
libsignal_protocol_nif
rebar.config
rebar.config
{erl_opts, [debug_info]}.
{deps, []}.
{plugins, [rebar3_format, rebar3_hex]}.
{auto_plugins, [rebar3_auto]}.
{hex,
[{name, "libsignal_protocol_nif"},
{description,
"High-performance Erlang NIF implementing Signal Protocol cryptographic primitives with libsodium. Provides Curve25519, Ed25519, AES-GCM, SHA-256/512, and HMAC-SHA256 operations."},
{licenses, ["Apache-2.0"]},
{links, [{"GitHub", "https://github.com/Hydepwns/libsignal-protocol-nif"}]},
{build_tools, ["rebar3"]},
{files,
["src/*.erl",
"src/*.app.src",
"c_src/*.c",
"c_src/*.h",
"c_src/CMakeLists.txt",
"scripts/copy_nifs.sh",
"rebar.config",
"README.md",
"LICENSE",
"CHANGELOG.md"]},
{maintainers, ["hydepwns"]},
{keywords,
["signal",
"protocol",
"cryptography",
"encryption",
"security",
"nif",
"libsodium",
"curve25519",
"ed25519",
"aes-gcm",
"sha256",
"sha512",
"hmac"]}]}.
{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.
{cover_export_format, html}.
% Default profile post-compile hook. c_src/build_nif.sh fetches a pre-built
% NIF tarball from the matching GitHub Release, falling back to a cmake/make
% source build. Ships in the Hex tarball so consumers run it automatically.
% Set LIBSIGNAL_NIF_BUILD_FROM_SOURCE=1 to force the source path.
{post_hooks, [{compile, "sh ./c_src/build_nif.sh"}]}.
{edoc_opts,
[{preprocess, true},
{macros, [{d, 'EDOC'}]},
{private, true},
{todo, true},
{dir, "tmp/doc"}]}.
{dialyzer,
[{warnings, [error_handling]},
{plt_apps, top_level_deps},
{plt_extra_apps, [crypto]},
{plt_location, local},
{plt_prefix, "rebar3"},
{base_plt_apps, [stdlib, kernel, crypto]},
{base_plt_location, global}]}.
{profiles,
[{test,
[{deps, []},
{erl_opts, [debug_info]},
{cover_opts, [verbose]},
{ct_opts, [{logdir, "tmp/ct_logs"}, {dir, "test/erl"}, {suite, signal_crypto_SUITE}]},
{extra_src_dirs, ["test/erl"]},
% Copy NIFs for test profile
{post_hooks, [{compile, "sh -c 'test -x ./scripts/copy_nifs.sh && ./scripts/copy_nifs.sh || true'"}]}]},
{unit,
[{deps, []},
{erl_opts, [debug_info]},
{cover_opts, [verbose]},
{ct_opts, [{logdir, "tmp/ct_logs_unit"}, {config, "test/erl/config/unit.config"}]},
{extra_src_dirs, ["test/erl"]},
% Copy NIFs for unit test profile
{post_hooks, [{compile, "sh -c 'test -x ./scripts/copy_nifs.sh && ./scripts/copy_nifs.sh || true'"}]}]},
{docs,
[{edoc_opts,
[{preprocess, true},
{macros, [{d, 'EDOC'}]},
{private, true},
{todo, true},
{dir, "tmp/doc"}]}]}]}.