split binary_types + clean up
This commit is contained in:
parent
9fe1d76dc4
commit
0c5622324c
8 changed files with 449 additions and 515 deletions
|
|
@ -12,15 +12,11 @@ type t = {
|
|||
fee_deposit: Amount.t;
|
||||
fee_refresh: Amount.t;
|
||||
fee_refund: Amount.t;
|
||||
h_pub: Binary_formats.DenominationHash.t;
|
||||
h_pub: Bin_type.DenominationHash.t;
|
||||
sign: string -> RsaSignature.t;
|
||||
master_sig: EddsaSignature.t option;
|
||||
}
|
||||
|
||||
let hash_pub _pub =
|
||||
(* todo public key converted to Crockford Base32 *)
|
||||
assert false
|
||||
|
||||
let make
|
||||
({
|
||||
section_name;
|
||||
|
|
@ -51,7 +47,7 @@ let make
|
|||
let open Mirage_crypto_pk.Rsa in
|
||||
let priv = generate ~bits:rsa_keysize () in
|
||||
let pub = pub_of_priv priv in
|
||||
let h_pub = Binary_formats.DenominationHash.hash pub in
|
||||
let h_pub = Bin_type.DenominationHash.hash (RsaPublicKey.to_octets pub) in
|
||||
let sign = RsaSignature.sign ~key:priv in
|
||||
let master_sig = None in
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue