add signatures.ml
This commit is contained in:
parent
46caf0b578
commit
2b9b3af452
4 changed files with 114 additions and 0 deletions
2
src/dune
2
src/dune
|
|
@ -11,6 +11,8 @@
|
|||
(libraries
|
||||
base_32
|
||||
;
|
||||
include
|
||||
;
|
||||
angstrom
|
||||
zarith ;
|
||||
mirage-crypto
|
||||
|
|
|
|||
23
src/signatures.ml
Normal file
23
src/signatures.ml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
(* https://docs.taler.net/core/api-common.html#id7 *)
|
||||
|
||||
module Purpose = struct
|
||||
(* defined in gnunet_crypto_lib.h *)
|
||||
type t = {
|
||||
(* This field equals the number of bytes being signed,
|
||||
namely 'sizeof (struct Data)'. *)
|
||||
size: Int32.t; (* = uint32_t *)
|
||||
(* This field is used to express the context in
|
||||
which the signature is made, ensuring that a
|
||||
signature cannot be lifted from one part of the protocol
|
||||
to another. See `src/include/taler/taler_signatures.h` within the
|
||||
exchange's codebase (git://taler.net/exchange). *)
|
||||
purpose: Int32.t; (* = uint32_t *)
|
||||
}
|
||||
end
|
||||
|
||||
module Data = struct
|
||||
type t = {
|
||||
purpose: Purpose.t;
|
||||
payloads: string list;
|
||||
}
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue