Opps, forgot this.
[core.git] / inc / classes / third_party / scrypt / README.md
1 PHP scrypt module
2 =================
3
4 [![Build Status](https://travis-ci.org/DomBlack/php-scrypt.svg?branch=master)](https://travis-ci.org/DomBlack/php-scrypt)
5
6 This is a PHP library providing a wrapper to [Colin Percival's scrypt implementation](http://www.tarsnap.com/scrypt.html). Scrypt is a key derivation function designed to be far more secure against hardware brute-force attacks than alternative functions such as PBKDF2 or bcrypt.
7
8 Details of the scrypt key derivation function are given in a paper by Colin Percival, Stronger Key Derivation via Sequential Memory-Hard Functions: [PDF](http://www.tarsnap.com/scrypt/scrypt-slides.pdf).
9
10 An example class using this module can be found in; scrypt.php
11
12 Join in!
13 --------
14
15 We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.
16
17 Please report bugs via the [github issue tracker](http://github.com/DomBlack/php-scrypt/issues).
18
19 Master [git repository](https://github.com/DomBlack/php-scrypt):
20
21     git clone git://github.com/DomBlack/php-scrypt.git
22
23 Authors
24 -------
25
26 This library is written and maintained by Dominic Black, <thephenix@gmail.com>.
27
28 ----
29
30 PECL Install
31 ============
32
33 This extension is now avaible through PECL.
34
35 ```
36 pecl install scrypt
37 ```
38
39 Build From Source
40 =================
41
42 Unix/OSX
43 --------
44
45 1. `phpize`
46 2. If on OSX; `export CFLAGS='-arch i386 -arch x86_64'`
47 3. `./configure --enable-scrypt`
48 4. `make`
49 5. `make install`
50 6. Add the extension to your php.ini
51
52 ````
53     ; Enable scrypt extension module
54     extension=scrypt.so
55 ````
56
57 Windows
58 -------
59
60 Using Visual Studio 2008 (or Visual C++ Express 2008) open up the attached project
61 inside the VS2008 folder. This project assumes you have the PHP thread safe source at;
62 `C:\phpsrcts\`, a PHP install at `C:\php\` and this source code extracted to
63 `C:\php-scrypt\`.
64
65 1. Build the project.
66 2. Copy the resultant `scrypt.dll` to your ext directory in PHP.
67 3. Add the extension to your php.ini
68
69 ````
70     ; Enable scrypt extension module
71     extension=scrypt.dll
72 ````
73
74 Legal Stuff
75 ===========
76 This works is licensed under the BSD 2-Clause license.
77
78 Original Scrypt Implementation;
79  Copyright (c) 2009 Colin Percival
80
81 PHP Module;
82  Copyright (c) 2012, Dominic Black
83
84 All rights reserved.
85
86 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
87
88 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
89 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
90 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.