1. INTRODUCTION

This project provides Lua bindings for the OpenSSL libcrypto libraries. 
libcrypto provides digest functions, such as MD5, SHA-1, and HMAC; cipher
functions, such as RC5 and Blowfish; public key crypto, such as RSA and
Diffie-Hellman; and some other assorted tools (i.e. random number generation).

Currently only the digest functions are mapped by this Lua binding.

http://luacrypto.luaforge.net/
  by Keith Howe <nezroy@luaforge.net>

2. REQUIREMENTS

 - Lua 5.x - http://www.lua.org/

   luacrypto uses the new Lua 5.1 package system. It will also work with
   Lua 5.0 using the included Compat-5.1 emulation system.

 - libcrypto 0.9.7+ - http://www.openssl.org/

   luacrypto has only been built against and tested with OpenSSL versions
   0.9.7 and above. It depends on additional API methods introduced in 0.9.7.

3. INSTALLATION

Edit the "config" file and set the fields to the correct values for your
environment:

 LUAINC: The location of your Lua include headers. This is required to build
 the code.

 LUA_PATH: The installation path for your system independent Lua files.
 LUA_CPATH: The installation path for your system dependent Lua files. These
   two settings are required to install the libraries properly.

 USE_COMPAT: Set this if your target environment is Lua 5.0. If your target is
   Lua 5.1, leave this blank.
 INSTALL_COMPAT: If you have set USE_COMPAT, you should also set this value to
   install the compat-5.1.lua module during "make install". However, if you
   already have the module installed (and possibly customised), leave this
   unset to keep it from being clobbered during "make install".

 (Note that the compat-5.1.lua module must be loaded before any wrapped 
  modules will work. See http://www.keplerproject.org/compat for details).

 LUA_TYPE: Set this to the type of Lua libraries you would like to install;
   either "lc" for precompiled Lua libraries (using luac), or "lua" for
   regular Lua libraries.
 
 LUA: The location of your Lua interpreter; only needed to run the tests.
 LUAC: The location of your Lua compiler; only needed to build the
   precompiled Lua libraries.

 CRYPTOLIB: On most systems, the default value will be fine. However, if your
   OpenSSL libcrypto library is not in the standard library paths, you may
   need to point this at your OpenSSL install.
 CRYPTOINC: On most systems, the default value will be fine. However, if your
   OpenSSL libcrypto headers are not in the standard include paths, you may
   need to point this at your OpenSSL install.

Once configured, run "make" to build the libraries. You can then run
"make tests" to run a test suite if you have set the location of your Lua
interpreter. Run "make install" to install the libraries in the correct
location.

4. CREDITS

Much of this code was heavily inspired by and/or lifted directly from the
lmd5 project (http://luaforge.net/projects/lmd5/), written by
Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>.

The Compat-5.1 library (http://www.keplerproject.org/compat/) written by
the folks at the Kepler Project is also included for Lua 5.0 support.
