Skip to content

Commit 7299853

Browse files
committed
Add readme
1 parent e062932 commit 7299853

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,31 @@ erlscrypt
44
[![Build Status](https://github.com/kpy3/erlscrypt/workflows/Test/badge.svg)](https://github.com/kpy3/erlscrypt/actions?query=branch%3Amaster+workflow%3A"Test") [![Erlang Versions](https://img.shields.io/badge/Supported%20Erlang%2FOTP-21.0%20to%2023.0-blue)](http://www.erlang.org)
55

66

7-
An OTP application
7+
An Erlang NIF for Colin Percival's "scrypt" function.
88

9-
Build
9+
General information can be found in [these slides (PDF)](http://www.tarsnap.com/scrypt/scrypt-slides.pdf)
10+
and [Colin Percival's page on scrypt](http://www.tarsnap.com/scrypt.html).
11+
12+
This library uses code from scrypt 1.6.6.
13+
14+
Using the library
1015
-----
16+
Add library as dependency in `rebar.config`
17+
18+
{deps, [
19+
{erlscrypt, "1.0.0"}
20+
...
21+
]}.
22+
23+
Add `erlscrypt` as application dependency
24+
25+
{application, app,
26+
[
27+
{applications, [
28+
...
29+
erlscrypt
30+
]},
31+
...
32+
]}.
1133

12-
$ rebar3 compile
34+
Use `erlscrypt:scrypt/6` for encrypting data.

c_src/scrypt_nif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ static ERL_NIF_TERM scrypt(ErlNifEnv *env, int argc,
7878
static ErlNifFunc nif_funcs[] = {
7979
{"scrypt", 6, scrypt, ERL_NIF_DIRTY_JOB_CPU_BOUND}};
8080

81-
ERL_NIF_INIT(scrypt, nif_funcs, NULL, NULL, NULL, NULL);
81+
ERL_NIF_INIT(erlscrypt, nif_funcs, NULL, NULL, NULL, NULL);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
{application, scrypt,
1+
{application, erlscrypt,
22
[{description, "Erlang NIF for scrypt"},
3-
{vsn, "0.1.0"},
3+
{vsn, "1.0.0"},
44
{registered, []},
55
{mod, {scrypt, []}},
66
{applications,

src/scrypt.erl renamed to src/erlscrypt.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-module(scrypt).
1+
-module(erlscrypt).
22
-on_load(init/0).
33

44
-behaviour(application).

0 commit comments

Comments
 (0)