this repo has no description
1opam-version: "2.0" 2maintainer: [ "Eyyüb Sari <eyyub.sari@epitech.eu>" 3 "Romain Calascibetta <romain.calascibetta@gmail.com>" ] 4authors: [ "Eyyüb Sari <eyyub.sari@epitech.eu>" 5 "Romain Calascibetta <romain.calascibetta@gmail.com>" ] 6homepage: "https://github.com/mirage/digestif" 7bug-reports: "https://github.com/mirage/digestif/issues" 8dev-repo: "git+https://github.com/mirage/digestif.git" 9doc: "https://mirage.github.io/digestif/" 10license: "MIT" 11 12build: [ 13 ["ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "false"] 14 ["ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "true"] 15 {with-test} 16 ["ocaml" "pkg/pkg.ml" "test"] {with-test} 17] 18depends: [ 19 "ocaml" {>= "4.03.0" & < "5.0"} 20 "ocamlbuild" {build} 21 "ocamlfind" {build} 22 "topkg" {build} 23 "base-bytes" 24 "alcotest" {with-test & < "0.8.0"} 25] 26synopsis: "Hash algorithms in OCaml" 27description: """ 28[![Build Status](https://travis-ci.org/oklm-wsh/Digestif.svg?branch=master)](https://travis-ci.org/oklm-wsh/Digestif) 29 30Digestif (and Rakia) provided some hashes functions in OCaml. Rakia provided 31theses functions by a C stub and Digestif is a pure implementation in OCaml of 32theses hashes. So theses hashes functions can be used in an 33OCaml/Mirage/JavasScript world. 34 35Obviously, Rakia is more faster than Digestif (the hot loop was implemented in 36C) but it's possible than Rakia can't compile in your architecture. In this 37case, it's better to use Digestif or send a PR to fix Rakia. 38 39## API 40 41We provided an interface with no dependancy (only with `Bigarray`, available by 42the OCaml distribution). You can choose between the `Bytes` module or the 43`Bigstring` module. You can't remove the dependancy with `Bigarray` because the 44context of the hash function is internally a `Bigstring.t`. 45 46We provided the same interface: 47 48```ocaml 49val init : unit -> ctx 50val feed : ctx -> buffer -> unit 51val get : ctx -> buffer 52 53val digest : buffer -> buffer 54val digestv : buffer list -> buffer 55val hmac : key:buffer -> buffer -> buffer 56val hmacv : key:buffer -> buffer list -> buffer 57``` 58 59`buffer` can be a `Bytes.t` or a `Bigstring.t`. We have an imperative and a 60functionnal way to produce a hash. 61 62## Hashes functions 63 64 At this time, we implement these hashes: 65 66 * SHA1 67 * SHA224 68 * SHA256 69 * SHA384 70 * SHA512 71 * BLAKE2B 72 73If you want an other hash function, you can ask in the issue. 74 75## Build Requirements 76 77 * OCaml >= 4.03.0 (may be less but need test) 78 * `base-bytes` meta-package 79 * Bigarray module (provided by the standard library of OCaml) 80 * `topkg`, `ocamlbuild` and `ocamlfind` to build the project 81 82If you want to compile the test program, you need: 83 84 * `alcotest` 85 86## Credits 87 88This work is from the [nocrypto](https://github.com/mirleft/nocrypto) library 89and the Vincent hanquez's work 90in [ocaml-sha](https://github.com/vincenthz/ocaml-sha). 91 92All credits appear in the begin of files and this library is motivated by two reasons: 93 94 * delete the dependancy with `nocrypto` if you don't use the encryption (and common) part 95 * aggregate all hashes functions in one library 96 97We deleted the `cstruct` **hard** dependancy (from `nocrypto`) and provide a 98interface to compute with the `Bytes.t`. We add the `blake2b` implementation too 99and we have the plan to provide the hash function in pure OCaml and other hashes 100functions. Finally, you can use `nocrypto` _and_ `digestif` together (no clash 101name in the C stub, don't worry). 102 103So, yes, it's redundant but deal with it!""" 104url { 105 src: 106 "https://github.com/mirage/digestif/releases/download/v0.1/digestif-0.1.tbz" 107 checksum: [ 108 "sha256=9bc36ff76944792d39e90f7feaf5a2f86b047396d4b707937f4c60b0dcb9bb80" 109 "md5=9d9f23d49da275d13a651c5294001227" 110 ] 111} 112available: [ arch != "s390x" ]