OASISFormat: 0.3
Name:        cryptokit
Version: 1.11
Authors:     Xavier Leroy
License:     LGPL-2 with OCaml linking exception
BuildTools:  ocamlbuild, ocamldoc
Plugins:     META (0.3), DevFiles (0.3), StdFiles (0.3)

Synopsis: Cryptographic primitives
Description:
  This library provides a variety of cryptographic primitives that can be used
  to implement cryptographic protocols in security-sensitive applications. The
  primitives provided include:
  .
  - Symmetric-key ciphers: AES, DES, Triple-DES, ARCfour,
    in ECB, CBC, CFB, OFB and counter modes.
  - Public-key cryptography: RSA encryption, Diffie-Hellman key agreement.
  - Hash functions and MACs: SHA-1, SHA-2, SHA-3, RIPEMD160, MD5,
    and MACs based on AES and DES.
  - Random number generation.
  - Encodings and compression: base 64, hexadecimal, Zlib compression.
  .
  Additional ciphers and hashes can easily be used in conjunction with
  the library. In particular, basic mechanisms such as chaining modes,
  output buffering, and padding are provided by generic classes that can
  easily be composed with user-provided ciphers. More generally, the library
  promotes a "Lego"-like style of constructing and composing
  transformations over character streams.

Flag zlib
  Description: Enable ZLib
  Default$: !os_type(Win32)

Flag hardwaresupport
  Description: Enable hardware support for AES (needs GCC or Clang)
  Default$: (architecture(amd64) || architecture(i386)) && !os_type(Win32)

Library cryptokit
  Path:    src
  Modules: CryptokitBignum, Cryptokit
  CSources: aesni.c,
            aesni.h,
            arcfour.c,
            arcfour.h,
            stubs-arcfour.c,
            blowfish.c,
            blowfish.h,
            stubs-blowfish.c,
            d3des.c,
            d3des.h,
            stubs-des.c,
            rijndael-alg-fst.c,
            rijndael-alg-fst.h,
            ripemd160.c,
            ripemd160.h,
            stubs-ripemd160.c,
            sha1.c,
            sha1.h,
            stubs-sha1.c,
            sha256.c,
            sha256.h,
            stubs-sha256.c,
            sha512.c,
            sha512.h,
            stubs-sha512.c,
            stubs-aes.c,
            stubs-md5.c,
            stubs-misc.c,
            stubs-rng.c,
            stubs-zlib.c,
            keccak.h,
            keccak.c,
            stubs-sha3.c
  BuildDepends: unix, zarith
  if flag(zlib)
    CCOpt: -DHAVE_ZLIB
    if system(win32) || system(win64)
      CCLib: zlib.lib
    else
      CCLib: -lz
  if system(win32) || system(win64)
    CCLib+: advapi32.lib
  else if system(mingw) || system(mingw64)
    CCLib+: -ladvapi32
  if flag(hardwaresupport)
    CCOpt+: -maes

Executable test
  Path:         test
  MainIs:       test.ml
  CompiledObject: native
  BuildDepends: cryptokit
  Build$:       flag(tests)
  Install:      false

Test main
  Command:   $test
  TestTools: test

Flag bench
  Description: Build and run benchmark
  Default: false

Executable speedtest
  Path:           test
  MainIs:         speedtest.ml
  CompiledObject: native
  BuildDepends:   cryptokit
  Install:        false
  Build$:         flag(bench)

Test bench
  Command:   $speedtest
  Run$:      flag(bench)
  TestTools: speedtest

Document "api-cryptokit"
  Title:                API reference for Cryptokit
  Type:                 ocamlbuild (0.3)
  InstallDir:           $htmldir/cryptokit
  BuildTools+:          ocamldoc
  XOCamlBuildPath:      src/
  XOCamlbuildLibraries: cryptokit

SourceRepository head
  Type:     svn
  Location: http://scm.ocamlcore.org/svnroot/cryptokit/trunk
  Browser:  https://forge.ocamlcore.org/scm/browser.php?group_id=133

SourceRepository this
  Type:     svn
  Location: http://scm.ocamlcore.org/svnroot/tags/release111
  Browser:  https://forge.ocamlcore.org/scm/browser.php?group_id=133
