summaryrefslogtreecommitdiff
path: root/README
blob: 281956ded70bcce39d4cbdf73f1f871c084d50a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
lua-scrypt
==========

lua-scrypt is a binding to libscrypt which is a password crypting and
verification library.  lua-scrypt uses the [libscrypt][] library and
provides a simple interface for hashing and verifying passwords.

    local scrypt = require "scrypt"

    local hash = scrypt.hash_password("Hello world")

    assert(scrypt.verify_password(hash, "Hello world"))

Installation
============

To compile lua-scrypt, on platforms with libscrypt 1.21 or later run,

    $ make CFLAGS+=-DTRUST_LIBSCRYPT_SALT_GEN

for platforms with older versions (earlier than 1.21) of libscrypt run,

    $ make

To install lua-scrypt, run,

    $ make install

Thanks
======

Originally, [Rob Kendrick][] wrote `lua-scrypt` back when there wasn't a shared
library for the scrypt algorithm.  The returned values were binary and a bit
messy, and as such they are not supported by this version of the library.

[libscrypt]: https://github.com/technion/libscrypt
[Rob Kendrick]: http://www.rjek.com/