-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsalsa20.opam
39 lines (39 loc) · 1.39 KB
/
salsa20.opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
opam-version: "2.0"
synopsis: "Salsa20 family of encryption functions, in pure OCaml"
description: """
```ocaml
utop[0]> #require "mirage-crypto";;
utop[1]> #require "mirage-crypto-rng.unix";;
utop[2]> Mirage_crypto_rng_unix.initialize ();;
- : unit = ()
utop[3]> let key = Mirage_crypto_rng.generate 32;;
val key : Cstruct.t = {Cstruct.buffer = <abstr>; off = 0; len = 32}
utop[4]> let nonce = Cstruct.create 8;;
val nonce : Cstruct.t = {Cstruct.buffer = <abstr>; off = 0; len = 8}
utop[5]> #require "salsa20";;
utop[6]> let state = Salsa20.create key nonce;;
val state : Salsa20.t = <abstr>
utop[7]> Salsa20.encrypt (Cstruct.of_string "My secret text") state |> Cstruct.to_string;;
- : string = " 2\\193\\020`\\142\\182\\234\\188H[R\\241V"
```
"""
maintainer: "Alfredo Beaumont <[email protected]>"
authors: "Alfredo Beaumont <[email protected]>"
license: "BSD-2-Clause"
homepage: "https://github.com/abeaumont/ocaml-salsa20"
dev-repo: "git+https://github.com/abeaumont/ocaml-salsa20.git"
bug-reports: "https://github.com/abeaumont/ocaml-salsa20/issues"
doc: "https://abeaumont.github.io/ocaml-salsa20/"
depends: [
"ocaml" {>= "4.07.0"}
"dune" {>= "1.8.0"}
"cstruct" {>= "6.0.0"}
"mirage-crypto"
"salsa20-core" {>= "0.1.0"}
"alcotest" {with-test}
]
build: [
[ "dune" "subst" ] {dev}
[ "dune" "build" "-j" jobs "-p" name "@install" ]
[ "dune" "runtest" "-j" jobs "-p" name ] {with-test}
]