Git Product home page Git Product logo

ltn12ce's Introduction

ltn12ce

ltn12ce is a Lua module which provides compression, decompression, encryption, decryption and hashing using a common interface. These are provided using the following libraries:

The list of currently supported algorithms:

  • Compression - bzip2 (.bz2), LZMA (.lzma), LZMA2 (.xz), DEFLATE, gzip (.gz)
  • Encryption - AES, Blowfish, Camellia, DES, 3-DES
  • Hashing - MD4, MD5, SHA1, SHA-224/256/385/512

One of the design goals of this module is to have no external dependencies. This means that every dependent library code is embedded and there are no prerequisites (except for Lua). In addition with CMake, this is a very portable way to handle compressed and/or encrypted data.

This is not a module to handle compressed archives (.zip, .rar, .tar), only compressed streams.

Installing

This module is created with LuaDist in mind, so once it is in the LuaDist package repository, you can simply install it using:

luadist install ltn12ce

Building

It is possible to build ltn12ce separately from LuaDist. The build process is based on CMake. All external libraries' build processes have been converted to CMake, so there are no autotools/configure scripts necessary. It should be possible to build the module for every build system CMake supports, which includes building for Windows, Linux and Mac OS X (in case of problems, please report).

The preferred way to build ltn12ce is using an out-of-source directory and running cmake inside it:

ltn12ce$ mkdir build; cd build
ltn12ce/build$ cmake ..
ltn12ce/build$ make

Installation is simply by copying the build/src/ltn12 somewhere into your Lua package.cpath.

It is possible to selectively compile the libraries in case of size/memory constraints. The following CMake variables control what gets built:

  • BUILD_CRYPTO - encryption and hashing using PolarSSL
  • BUILD_BZIP2 - bzip2 compression
  • BUILD_LZMA - LZMA and XZ compression
  • BUILD_ZLIB - zlib compression

All flags are turned on by default.

API

All algorithms implement a common API. An algorithm constructor creates an object, which acts as a filter that takes string input and returns processed string output. True LTN12 filter interface will be implemented later using pure Lua module.

The object (let's name it filter), when initialized, provides the following methods:

  • filter:update(data : string) : string - call this method (at least once, but maybe repeatedly) to provide additional input to the filter. data must be a string, but it may be an empty string (#data == 0). It returns a string representing additional output from this filter. Given the nature of the algorithms, which may buffer the data until something can be processed, update may return an empty string, but it never returns nil.

  • filter:finish() : string - after the entire input has been consumed, there may be some data which is buffered. Call this method to finish the processing and return any leftover data. This may be an empty string.

Imagine a process input -> filter -> output. input can be provided in one or multiple chunks by calls to filter:update(chunk) followed by filter:finish(). The concatenation of the results of update() and finish() calls is the entire output of the filter.

ltn12.core

This module is a C binding to the embedded libraries. Here is a list of functions/objects/methods it provides. Every object implements the update and finish functions documented above, and they are not repeated here.

  • core.ciphers() : { string } - an array of valid cipher identifiers for core.cipher.

  • core.cipher(cipherid : string) : cipher - create a cipher, where cipherid is one of the identifiers from core.ciphers(). An example of such cipherid is "AES-256-CBC". cipherid is case-insensitive. The operation (encryption/decryption) and keys are set using cipher:setkeys().

  • cipher:name() : string - the cipher identifier of the given object (in case you forget ;-)

  • cipher:keysize() : number - the length of expected encryption/decryption key.

  • cipher:setkey(key : string, operation : string) - sets the keys and operation for the given cipher. operation is one of two strings "encrypt" and "decrypt", and key is the binary encryption/decryption key. It must be of the length reported by cipher:keysize().

  • core.digests() : { string } - an array of valid digest identifiers for core.digest().

  • core.digest(digestid : string) : digest - create a digest (hash) algorithm using a digest identifier reported by core.digests(). digestid is case-insensitive.

  • digest:name() : string - the digest identifier.

  • digest:size() : number - the size of the resulting digest in bytes.

  • digest:update(data : string) : string - a little implementation note on this method - this always returns an empty string. No output is produced until digest:finish(), which returns the resulting digest.

Compression constructors (bzip2, lzma, zlib) have the following interface:

  • core.compressor(operation : string, level : number) : filter - create a (de)compressor, where compressor is one of bzip2, lzma, zlib. operation must be one of "compress" or "decompress". When compressing, the second parameter represents the compression level, and is a number between 1 and 9 including.

Sample

function makekey(key, bits)
	return key .. string.rep('0', bits/8 - #key)
end
local compressor = core.zlib('compress', 9)
local encrypter = core.cipher('aes-256-cbc')
encrypter:setkey(makekey('12345678', 256), 'encrypt')

function runthrough(f, data) return f:update(data) .. f:finish() end

local input = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
local compressed = runthrough(compressor, input)
local output = runthrough(encrypter, compressed)

License

Copyright (C) 2013, Michal Kottman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ltn12ce's People

Contributors

mkottman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

hujinyong

ltn12ce's Issues

Build failure

When I trying to build the module, I'm getting failure when it trying to link against bundled zlib:

Scanning dependencies of target ltn12ce_core
[ 95%] Building C object src/CMakeFiles/ltn12ce_core.dir/ltn12ce_core.c.o
[ 96%] Building C object src/CMakeFiles/ltn12ce_core.dir/ltn12ce_crypto.c.o
[ 97%] Building C object src/CMakeFiles/ltn12ce_core.dir/ltn12ce_digest.c.o
[ 98%] Building C object src/CMakeFiles/ltn12ce_core.dir/ltn12ce_comp_bzip2.c.o
[ 98%] Building C object src/CMakeFiles/ltn12ce_core.dir/ltn12ce_comp_lzma.c.o
[ 99%] Building C object src/CMakeFiles/ltn12ce_core.dir/ltn12ce_comp_zlib.c.o
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:80:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
                              ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:81:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
                           ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:97:5: error: unknown type name ‘alloc_func’
     alloc_func zalloc;  /* used to allocate the internal state */
     ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:98:5: error: unknown type name ‘free_func’
     free_func  zfree;   /* used to free the internal state */
     ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:216:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN const char * ZEXPORT zlibVersion OF((void));
                                 ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:246:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:353:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
                       ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:392:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:505:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
                       ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:584:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
                                 ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:628:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
                        ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:646:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:657:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
                          ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:678:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
                        ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:695:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
                           ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:710:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
                           ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:725:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:742:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:816:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
                                 ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:839:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
                        ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:858:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
                        ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:874:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:884:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
                          ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:896:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:917:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:945:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1007:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
                             ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1008:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1010:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
                        ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1079:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
                           ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1087:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
                               ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1140:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
                     ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1154:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
                      ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1170:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
                            ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1177:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
                       ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1241:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
                       ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1264:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
                     ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1281:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
                        ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1290:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
                   ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1318:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1341:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
                   ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1349:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
                      ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1362:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
                   ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1368:19: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
                   ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1377:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
                     ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1389:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1424:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
                     ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1452:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzeof OF((gzFile file));
                  ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1467:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
                     ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1488:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1501:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
                      ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1502:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
                      ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1513:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1529:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
                        ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1546:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
                      ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1577:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1611:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1613:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1615:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
                          ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1619:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
                          ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1621:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1653:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));
                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1697:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
    ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
                         ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1698:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
    ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
                                  ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1699:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
    ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
                                  ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1700:36: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
    ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
                                    ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1701:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
    ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
                                 ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1702:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
    ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
                               ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1718:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN const char   * ZEXPORT zError           OF((int));
                            ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1719:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1720:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
                                     ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1721:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1722:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1723:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
 ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
                             ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:3:0:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/include/zlib/zlib.h:1725:32: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
   ZEXTERN unsigned long  ZEXPORT gzflags          OF((void));
                                ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c: In function ‘lzlib_update’:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:73:19: warning: implicit declaration of function ‘deflate’ [-Wimplicit-function-declaration]
             ret = deflate(strm, Z_NO_FLUSH);
                   ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:75:19: warning: implicit declaration of function ‘inflate’ [-Wimplicit-function-declaration]
             ret = inflate(strm, Z_NO_FLUSH);
                   ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c: In function ‘lzlib’:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:151:15: warning: implicit declaration of function ‘deflateInit_’ [-Wimplicit-function-declaration]
         err = deflateInit(strm, preset);
               ^
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_comp_zlib.c:156:15: warning: implicit declaration of function ‘inflateInit2_’ [-Wimplicit-function-declaration]
         err = inflateInit2(strm, AUTODETECT_GZIP + MAX_WBITS);
               ^
make[2]: *** [src/CMakeFiles/ltn12ce_core.dir/build.make:183: src/CMakeFiles/ltn12ce_core.dir/ltn12ce_comp_zlib.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:132: src/CMakeFiles/ltn12ce_core.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

Lua5.2/Lua5.3 compatibility

src/ltn12ce_comp_zlib.c: In function ‘init_comp_zlib’:
src/ltn12ce_comp_zlib.c:184:5: warning: implicit declaration of function ‘luaL_register’ [-Wimplicit-function-declaration]
     luaL_register(L, NULL, module_functions);
     ^
make[2]: *** [src/CMakeFiles/ltn12ce_core.dir/build.make:183: src/CMakeFiles/ltn12ce_core.dir/ltn12ce_comp_zlib.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
src/ltn12ce_comp_bzip2.c: In function ‘init_comp_bzip2’:
src/ltn12ce_comp_bzip2.c:195:5: warning: implicit declaration of function ‘luaL_register’ [-Wimplicit-function-declaration]
     luaL_register(L, NULL, module_functions);
     ^
src/ltn12ce_comp_lzma.c: In function ‘init_comp_lzma’:
src/ltn12ce_comp_lzma.c:181:5: warning: implicit declaration of function ‘luaL_register’ [-Wimplicit-function-declaration]
     luaL_register(L, NULL, module_functions);
     ^

ref: http://lua.2524044.n2.nabble.com/Why-did-luaL-openlib-luaL-register-go-td7649023.html
One of the way to fix:
https://github.com/msva/luaxml/blob/master/LuaXML_lib.c#L53
+
https://github.com/msva/luaxml/blob/master/LuaXML_lib.c#L441

or:
https://github.com/brimworks/lua-zlib/blob/master/lua_zlib.c#L11-L16 (less preferred, since still keeps it in global space in 5.1, which is a bad practice)

[feature] Possibility to build against system-wide libraries

Can you add an options to build against system-wide installed deps-libraries instead of bundled ones?

// this including bumping to latest PolarSSL (aka ARM mbed SSL) API. For example:

/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_crypto.c: In function ‘lcipher_reset’:
/var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_crypto.c:96:15: error: too many arguments to function ‘cipher_reset’
     int err = cipher_reset(ctx, iv);
               ^
In file included from /var/tmp/portage/dev-lua/ltn12ce-9999/work/lua51/ltn12ce-9999/src/ltn12ce_crypto.c:3:0:
/usr/include/polarssl/cipher.h:552:5: note: declared here
 int cipher_reset( cipher_context_t *ctx );
     ^

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.