Giter Site home page Giter Site logo

php-scrypt's Introduction

PHP scrypt module

Build Status

This is a PHP library providing a wrapper to Colin Percival's scrypt implementation. 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.

Details of the scrypt key derivation function are given in a paper by Colin Percival, Stronger Key Derivation via Sequential Memory-Hard Functions: PDF.

An example class using this module can be found in; scrypt.php

Join in!

We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.

Please report bugs via the github issue tracker.

Master git repository:

git clone git://github.com/DomBlack/php-scrypt.git

Authors

This library is written and maintained by Dominic Black, [email protected].


PECL Install

This extension is now avaible through PECL.

pecl install scrypt

Build From Source

Unix/OSX

  1. phpize
  2. If on OSX; export CFLAGS='-arch i386 -arch x86_64'
  3. ./configure --enable-scrypt
  4. make
  5. make install
  6. Add the extension to your php.ini
    ; Enable scrypt extension module
    extension=scrypt.so

Windows

Using Visual Studio 2008 (or Visual C++ Express 2008) open up the attached project inside the VS2008 folder. This project assumes you have the PHP thread safe source at; C:\phpsrcts\, a PHP install at C:\php\ and this source code extracted to C:\php-scrypt\.

  1. Build the project.
  2. Copy the resultant scrypt.dll to your ext directory in PHP.
  3. Add the extension to your php.ini
    ; Enable scrypt extension module
    extension=scrypt.dll

Legal Stuff

This works is licensed under the BSD 2-Clause license.

Original Scrypt Implementation; Copyright (c) 2009 Colin Percival

PHP Module; Copyright (c) 2012, Dominic Black

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. 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.

php-scrypt's People

Contributors

domblack avatar parent5446 avatar 0xace avatar weltling avatar wdc avatar ciarand avatar pprasse avatar sarciszewski avatar sergey-dryabzhinsky avatar kingkorf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.